Python virtual Environment Virtualenvwrapper Unable to lift level virtual environment software solution

Source: Internet
Author: User
Tags install django virtual environment virtualenv

Virtualenv is used to create a standalone Python environment, where multiple python is independent from each other, it can install a new suite without permission, different apps can use different suite versions, and the package upgrade does not affect other apps.

Virtaulenvwrapper is the VIRTUALENV expansion pack for more convenient management of virtual environments such as, additions, deletions, replications, switches, and more.

When you recently created a Python virtual environment using Virtaulenvwrapper's mkvirtualenv, Discovery of a condition that could not be upgraded when Django was upgraded to 1.8 in the created virtual environment: (django-1.6.10 installed outside the machine)

[Email protected] the: the: -~ =Workon Test (test) [email protected] the: the: -~ = + pipInstall--upgrade django==1.8You is using PIP version6.0.6, however version7.1.0is available. You should consider upgrading via the'pip install--upgrade pip'command. Collecting Django==1.8Using Cached Django-1.8-py2.py3-none-any.whlinstalling collected Packages:django Found existing Installation:django1.6.TenNot uninstalling Django at/usr/local/python2.7/lib/python2.7/site-packages, outside environment/app/pyweb/test successfully installed Django-1.6.Ten

Tip You cannot install django-1.8 on/usr/local/python2.7/lib/python2.7/site-packages. The reason for this is that Pythonpath is already specified in the Global environment variable, so when you install Django, the 1.8 version is installed by default to the specified Pythonpath, causing the django-1.8 to fail to install successfully.

The following: Thecat /etc/profile......export PATH=/usr/local/python2. 7/bin: $PATHexport PYTHONPATH=/usr/local/python2. 7/lib/python2. 7/site-packages:/usr/lib/python2. 6/site-packages: $PYTHONPATH

Therefore, the/etc/profile global variable in the Pythonpath comment out, and then re-login to the virtual environment to install the upgrade is OK.

[Email protected]Ten: -: the~ =Workon Test (test) [email protected]Ten: -: $~(test) [email protected]Ten: the: the~ = + pipInstalldjango==1.8.3You is using PIP version7.0.3, however version7.1.0is available. You should consider upgrading via the'pip install--upgrade pip'command. Collecting Django==1.8.3Using Cached Django-1.8.3-py2.py3-none-any.whlinstalling collected Packages:django Found existing Installation:django1.6.TenUninstalling Django-1.6.Ten: Successfully uninstalled Django-1.6.Tensuccessfully installed Django-1.8.3

Python virtual Environment Virtualenvwrapper Unable to lift level virtual environment software solution

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.