Trying to upgrade Django using pip on CentOS results in segmentation fault

2016-02-17 Thread Tanuka Dutta



down votefavorite 


Hello,

I have a Linux CentOS 6.7 installation on a VM. A few months ago, I had - 
compiled and installed Python 2.7.8 on it - installed virtualenv-13.1.2 in 
/usr/lib/python2.7/site-packages - installed Django 1.7 inside the 
virtualenv. - compiled and installed mod_wsgi 4.4.21 and used it to deploy 
Django on Apache

I have been using this over the last few months with no issues.

I am now trying to upgrade to Django 1.8.8. I activated the virtualenv and 
then executed the following command, but it encounters a segmentation fault 
each time.

$pip2.7 install --upgrade django==1.8.8
Collecting django==1.8.8
/home/syt_admin/.virtualenvs/vishwaas_env/lib/python2.7/sitepackages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90:
 InsecurePlatformWarning: A true SSLContext object is not available. This 
prevents urllib3 from configuring SSL appropriately and may cause certain SSL 
connections to fail. For more information, see 
https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.InsecurePlatformWarningDownloading
 Django-1.8.8-py2.py3-none-any.whl (6.2MB)99% |### 
| 6.2MB 9.1MB/s eta 0:00:01Segmentation fault

If I preface the command with sudo, there is no segmentation fault, but it 
does not proceed to install the new version of Django at all.

Output of verbose option given below 

pip2.7 install --upgrade django==1.8.8 -v

Collecting django==1.8.8Getting page 
https://pypi.python.org/simple/django/Starting new HTTPS connection (1): 
pypi.python.org/home/syt_admin/.virtualenvs/vishwaas_env/lib/python2.7/site-
packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: 
InsecurePlatformWarning: A true SSLContext object is not available. This 
prevents urllib3 from configuring SSL appropriately and may cause certain SSL 
connections to fail. For more information, see 
https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.InsecurePlatformWarning"GET
 /simple/django/ HTTP/1.1" 200 39851 location(s) to search for versions of 
django:* https://pypi.python.org/simple/django/Getting page 
https://pypi.python.org/simple/django/"GET /simple/django/ HTTP/1.1" 200 
3985Analyzing links from page https://pypi.python.org/simple/django/Found link 
https://pypi.python.org/packages/any/D/Django/Django-1.5.2-py2.py3-none-any.whl#md5=07f0d2d42162945d0ad031fc9737847d
 (from https://pypi.python.org/simple/django/), version: 1.5.2Found link 
https://pypi.python.org/packages/any/D/Django/Django-1.5.8-py2.py3-none-any.whl#md5=1e3418bd1d6f9725a3d1264c9352f2a1
 (from https://pypi.python.org/simple/django/), version: 1.5.8Found link 
https://pypi.python.org/packages/any/D/Django/Django-1.6.1-py2.py3-none-any.whl#md5=c7b7a4437b36400f1c23953e9700fd29
 (from https://pypi.python.org/simple/django/), version: 1.6.1Found link 
https://pypi.python.org/packages/any/D/Django/Django-1.6.2-py2.py3-none-any.whl#md5=3bd014923e85df771b34d12c0ab3c9e1
 (from https://pypi.python.org/simple/django/), version: 1.6.2Found link 
https://pypi.python.org/packages/any/D/Django/Django-1.6.5-py2.py3-none-any.whl#md5=2bcdb4729f9f358b0925b532eef0a8ff
 (from https://pypi.python.org/simple/django/), version: 
1.6.5..Found link 
https://pypi.python.org/packages/source/D/Django/Django-1.8.8.tar.gz#md5=08ecf83b7e9d064ed7e3981ddc3a8a15
 (from https://pypi.python.org/simple/django/), version: 1.8.8Found link 
https://pypi.python.org/packages/source/D/Django/Django-1.8.9.tar.gz#md5=49f6863b1c83825fb2f473c141c28e15
 (from https://pypi.python.org/simple/django/), version: 1.8.9Found link 
https://pypi.python.org/packages/source/D/Django/Django-1.8.tar.gz#md5=9a811faf67ca0f3e0d43e670a1cc503d
 (from https://pypi.python.org/simple/django/), version: 1.8Found link 
https://pypi.python.org/packages/source/D/Django/Django-1.9.1.tar.gz#md5=02754aa2d5c9c171dfc3f9422b20e12c
 (from https://pypi.python.org/simple/django/), version: 1.9.1Found link 
https://pypi.python.org/packages/source/D/Django/Django-1.9.2.tar.gz#md5=ee90280973d435a1a6aa01b453b50cd1
 (from https://pypi.python.org/simple/django/), version: 1.9.2Found link 
https://pypi.python.org/packages/source/D/Django/Django-1.9.tar.gz#md5=110389cf89196334182295165852e082
 (from https://pypi.python.org/simple/django/), version: 1.9Found link 
https://pypi.python.org/packages/source/D/Django/Django-1.9rc1.tar.gz#md5=b971686521ea09b4bf82aec3e794fcbc
 (from https://pypi.python.org/simple/django/), version: 1.9rc1Using version 
1.8.8 (newest of versions: 1.8.8, 1.8.8)"GET 
/packages/py2.py3/D/Django/Django-1.8.8-py2.py3-none-any.whl HTTP/1.1" 200 
6170205Downloading Django-1.8.8-py2.py3-none-any.whl (6.2MB)Downloading from 
URL 
https://pypi.python.org/packages/py2.py3/D/Django/Django-1.8.8-py2.py3-none-any.whl#md5=97334c82efbac0f93f8b6dd4ee4b516f
 (from https://pypi.python.o

Re: Trying to upgrade Django using pip on CentOS results in segmentation fault

2016-02-17 Thread Tanuka Dutta
p2.7 install -r 
requirements/production.txt  --no-cache-dir

This worked fine, and I was able to upgrade the packages in my old 
virtualenv as well as do a fresh install in the new one.

Whew!!

Regards,
Tanuka


On Wednesday, 17 February 2016 22:09:03 UTC+5:30, ke1g wrote:
>
> Or clone into a new virtualenv (you are using virtualenv, aren't you, and 
> you are using requires.txt and pip, and your code is in revision control, 
> right?), then change the Apache configuration to use the new VE and restart.
>
> On Wed, Feb 17, 2016 at 7:00 AM, Mike Dewhirst  > wrote:
>
> Try stopping Apache during the upgrade. I need to do that on Ubuntu. 
>
> Good luck
>
> *Connected by Motorola*
>
>
> Tanuka Dutta > wrote:
>
>
>
>
> down votefavorite 
> <http://stackoverflow.com/questions/35430173/trying-to-upgrade-django-on-centos-encounters-segmentation-fault#>
>
> Hello,
>
> I have a Linux CentOS 6.7 installation on a VM. A few months ago, I had - 
> compiled and installed Python 2.7.8 on it - installed virtualenv-13.1.2 in 
> /usr/lib/python2.7/site-packages - installed Django 1.7 inside the 
> virtualenv. - compiled and installed mod_wsgi 4.4.21 and used it to deploy 
> Django on Apache
>
> I have been using this over the last few months with no issues.
>
> I am now trying to upgrade to Django 1.8.8. I activated the virtualenv and 
> then executed the following command, but it encounters a segmentation fault 
> each time.
>
> $pip2.7 install --upgrade django==1.8.8
> Collecting django==1.8.8
> /home/syt_admin/.virtualenvs/vishwaas_env/lib/python2.7/sitepackages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90:
>  InsecurePlatformWarning: A true SSLContext object is not available. This 
> prevents urllib3 from configuring SSL appropriately and may cause certain SSL 
> connections to fail. For more information, see 
> https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.InsecurePlatformWarningDownloading
>  Django-1.8.8-py2.py3-none-any.whl (6.2MB)99% 
> |### | 6.2MB 9.1MB/s eta 0:00:01Segmentation fault
>
> If I preface the command with sudo, there is no segmentation fault, but it 
> does not proceed to install the new version of Django at all.
>
> Output of verbose option given below 
>
> pip2.7 install --upgrade django==1.8.8 -v
>
> Collecting django==1.8.8Getting page 
> https://pypi.python.org/simple/django/Starting new HTTPS connection (1): 
> pypi.python.org/home/syt_admin/.virtualenvs/vishwaas_env/lib/python2.7/site-  
>   packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: 
> InsecurePlatformWarning: A true SSLContext object is not available. This 
> prevents urllib3 from configuring SSL appropriately and may cause certain SSL 
> connections to fail. For more information, see 
> https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.InsecurePlatformWarning"GET
>  /simple/django/ HTTP/1.1" 200 39851 location(s) to search for versions of 
> django:* https://pypi.python.org/simple/django/Getting page 
> https://pypi.python.org/simple/django/"GET /simple/django/ HTTP/1.1" 200 
> 3985Analyzing links from page https://pypi.python.org/simple/django/Found 
> link 
> https://pypi.python.org/packages/any/D/Django/Django-1.5.2-py2.py3-none-any.whl#md5=07f0d2d42162945d0ad031fc9737847d
>  (from https://pypi.python.org/simple/django/), version: 1.5.2Found link 
> https://pypi.python.org/packages/any/D/Django/Django-1.5.8-py2.py3-none-any.whl#md5=1e3418bd1d6f9725a3d1264c9352f2a1
>  (from https://pypi.python.org/simple/django/), version: 1.5.8Found link 
> https://pypi.python.org/packages/any/D/Django/Django-1.6.1-py2.py3-none-any.whl#md5=c7b7a4437b36400f1c23953e9700fd29
>  (from https://pypi.python.org/simple/django/), version: 1.6.1Found link 
> https://pypi.python.org/packages/any/D/Django/Django-1.6.2-py2.py3-none-any.whl#md5=3bd014923e85df771b34d12c0ab3c9e1
>  (from https://pypi.python.org/simple/django/), version: 1.6.2Found link 
> https://pypi.python.org/packages/any/D/Django/Django-1.6.5-py2.py3-none-any.whl#md5=2bcdb4729f9f358b0925b532eef0a8ff
>  (from https://pypi.python.org/simple/django/), version: 
> 1.6.5..Found link 
> https://pypi.python.org/packages/source/D/Django/Django-1.8.8.tar.gz#md5=08ecf83b7e9d064ed7e3981ddc3a8a15
>  (from https://pypi.python.org/simple/django/), version: 1.8.8Found link 
> https://pypi.python.org/packages/source/D/Django/Django-1.8.9.tar.gz#md5=49f6863b1c83825fb2f473c141c28e15
>  (from https://pypi.python.org/simple/django/), version: 1.8.9Found link 
> https://pypi.python.org/packages/source/D/Django/Django-1.8.tar.gz#md5=9a811faf67ca0f3e0d43e670a1cc503d
>  (from https://pypi.py

Re: tutorial?

2016-02-24 Thread Tanuka Dutta
http://www.django-rest-framework.org/

- Tanuka

On Wednesday, 24 February 2016 17:48:17 UTC+5:30, Mitesh Prajapati wrote:
>
> I'm new to Django/Python world. 
>
> I want references(book/tutorials) to learn "how to build REST APIs with 
> Django" using ORM?
>
>
> Thanks in advance!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/93889add-8181-44c5-9e24-1491fc50b83e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.