![]() If you then want to use sudo with that user, make sure to include the -i. To run this automatically, include: source /.nvm/nvm.sh. This should allow you to install packages to this virtualenv using the pip version of your choice, without the need for sudo. If you installed node/npm with nvm, the nvm environment configuration file has to be run before you can use either package. Pip 9.0.1 from /home/ec2-user/myenv/local/lib/python2.7/dist-packages (python 2.7) Installing setuptools, pip, wheel.done.Īctivate the virtual environment and confirm the version and location of the upgraded pip: New python executable in /home/ec2-user/myenv/bin/python2.7Īlso creating executable in /home/ec2-user/myenv/bin/python I used the virtualenv release notes to find out which version of pip corresponds to which version of virtualenv. Successfully uninstalled virtualenv-12.0.7 Installing collected packages: virtualenvįound existing installation: virtualenv 12.0.7 You are using pip version 6.1.1, however version 9.0.1 is available. Install the version of virtualenv packaged with the version of pip you are looking to upgrade to to the system-level pip (e.g. ![]() If you're OK with that, here's the basic idea: I think the best strategy in this case is to manage pip is as part of a virtual environment using virtualenv rather than messing with the system-level version. Another alternative, if you'd prefer to not add that path to your secure_path is to make a symbolic link to the new pip executable in /usr/bin. You can add this path to the secure_path variable by running sudo visudo. Not entirely clear on where the name translation from pip to pip-2.7 occurs.Īs mentioned in another answer, pip now exists in /usr/local/bin after the upgrade, which is no longer in the sudo secure path. So, that's where our error comes from, as the upgrade clearly doesn't clean this file up. # EASY-INSTALL-ENTRY-SCRIPT: 'pip=6.1.1','console_scripts','pip2.7'įrom pkg_resources import load_entry_point However, what remains is a file called pip-27, which contains the following: #!/usr/bin/python2.7 The reason sudo pip stops working after the upgrade, is because the executable (or symbolic link) is removed from /usr/bin.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |