I'm having an issue with upgrading pip from 7.1.2 to 8.1.1. At first I downloaded Python 3.4 and installed pip from there but then noticed Python 3.5 was there so I downloaded that. When trying to use pip to install selenium it says You are using pip version 7.1.2 however 8.1.1 is available. I do "pip install --upgrade pip" then get an error. See attached screenshot.What do I do? Btw I'm on windows 8.1.enter image description here
Ok. It's working if I run cmd as an admin then do
python -m pip install --upgrade pip
In Mac, I ran:
sudo python -m pip install --upgrade pip
Then, it worked.
Did you try python -m pip install --upgrade pip? if pip is being used, it cannot install itself.
This is a common question that requires few germane steps to pre-installing other modules in Python.
Depending on the version of your Python (Either the 2.X series or the 3.X series), and the operation system (Window, Ubuntu, etc ), you will need to do the following;
Open CMD (Short-Cut: Control+R button on the keyboard)
Make sure the current directory is the administrator on the hard-drive of the system and your internet connection is available.
i.e C:\Users\System_Name PC
Type in the command:
Pip install --upgrade pip
i.e C:\Users\System_Name PC > pip install --upgrade pip
and hit ENTER key to activate:
It will uninstall the previous version and install the latest version
Restart the system and continue the installation of each python module
e.g Pip install dateutil
Pip install numpy
Pip install matplotlib
Peradventure you wish to specify the version of the python module dependencies you want to install;
Pip install Django==1.90
It will install the specific version: otherwise if not specified, the latest version of the target module would be installed.
Related
I have python 2.7 installed on my machine globally and the pip version is pip 20.3.4. I want to install Django version 1.11.22. When I am trying to do so with pip install Django==1.11.22, I am getting the error as mentioned in the picture. This is not just while installing Django, I am getting the same error while installing anything like pip install openpyxl.
The latest version Python 2.7.18 should work fine. Install it with pip enabled or install pip after using python -m ensurepip. Upgrade pip:
pip install --upgrade "pip<21.0" "setuptools<45"
Install virtualenv:
pip install --upgrade "virtualenv<20"
Create a virtual environment (very much recommended) somewhere and activate it:
virtualenv django-venv
django-venv\Scripts\activate.
Install Django (can be done without a virtual environment):
pip install --upgrade "Django==1.11.22".
Remember to activate the virtual environment (if you use it) every time you open a new terminal.
As the error says and #Willem Van Onsem said, python 2.7 is no longer support, you can't install it nowadays
I am using pip in Ubuntu 20.04 with Python 3.8. I am trying to upgrade some packages and it seems to work since it does not give any error message. However, if I do pip show for the desired package, the version remains unchanged.
For instance, in the case of pip itself I am doing the following:
python -m pip install --upgrade pip
And I am obtaining:
Collecting pip
Using cached pip-20.3.3-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
Successfully installed pip-20.3.3
Then, when I try to check the installed version with pip show pip, I get the following:
Name: pip
Version: 20.0.2
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: pypa-dev#groups.google.com
License: MIT
Location: /usr/lib/python3/dist-packages
Requires:
Required-by: pip-upgrade
I have observed this problem also for scipy. However, I have been able to upgrade virtualenv and seaborn following the same procedure described above.
On the other hand, if I do the same upgrade process using sudo it does work. However, I would like to have the new versions installed not only for superuser.
Thanks in advance.
You may have multiple installations of Python on your system.
First provide the full name for Python 3.8 when installing pip to make sure it is installing pip for 3.8.
python3.8 -m pip install --upgrade pip
You could also try to use the pip specifically for Python 3.8. It is usually called pip3.8.
It could also be the environment you are installing it in. It's better to use pip --version so that you know where it is pulling pip from, as well the version of Python being used.
pip3.8 --version
pip 20.3.3 from /home/eandersson/.local/lib/python3.8/site-packages/pip (python 3.8)
As you can see here depending on the user and env variables set it may be installed in a different location.
sudo pip3.8 --version
pip 20.2.3 from /usr/local/lib/python3.8/dist-packages/pip (python 3.8)
I would also recommend that you use a virtualenv if you need specific versions libraries installed for your project.
virtualenv venv
source venv/bin/activate
pip install pip --upgrade
I have a problem with the pip python 3.x installation.
I have pip version 19.0.3, but when i use pycharm, it keeps saying that i need the pip updated.
when i check the folder, I can see there is another version of pip pip-10.0.1-py3.7.egg in the folder.
I remember ticking the option to add the python in the environment path when i installed python.
When I tried to update/install pip again, i got the error.
(venv) C:\Users\ranic\PycharmProjects\ProjectDatabase>pip help install
You are using pip version 10.0.1, however version 19.0.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
(venv) C:\Users\r\PycharmProjects\ProjectDatabase>python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\users\r\pycharmprojects\projectdatabase\venv\lib\site-packages (19.0.3)
Thank you in advance.
If you check, I guarantee that pip is not in the same place as python.
Mine are, seen below:
C:\Users\adsmith>where pip
C:\Users\adsmith\AppData\Local\Programs\Python\Python36-32\Scripts\pip.exe
C:\Users\adsmith>where python
C:\Users\adsmith\AppData\Local\Programs\Python\Python36-32\python.exe
but I'm guessing your python is referring to Python2, and pip Python3 (or vice versa). If you find the version of Python that pip refers to, you should be able to do:
path/to/that/python -m pip install --upgrade pip
I have recently configured python3 for other application and running on the same machine where python 2.7 was running.. I see python3 applications are working fine with command
python -m pip install package-name and
python3 manage.py runserver command
But I am facing trouble with my existing application and new application with following issue while installing package
You are using pip version 7.1.0, however version 9.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting django-allauth==0.27.0
Could not find a version that satisfies the requirement django-allauth==0.27.0 (from versions: )
No matching distribution found for django-allauth==0.27.0
This is the command I used,
pip install django-allauth==0.27.0
Anybody know how to resolve it?
This is the command output,
pip 7.1.0 from /Users/overflow/.virtualenvs/ion/lib/python2.7/site-packages (python 2.7)
Try installing another version:
pip install django-allauth
Make sure you're using the version of pip that corresponds to the version of Python you are using:
pip --version
Alternatively, be explicit in which version you use:
python3 -m pip install django-allauth
or
python2 -m pip install django-allauth
try
pip install --upgrade pip
first
and then
pip install django-allauth==0.27.0
I'm little confused with you'r version problem, but you can choose you'r python vertion using py-2.x or py -3.x. For example:
py -3.6 -m pip install djangp-allauth==0.27.0
py -2.7 -m pip install djangp-allauth==0.27.0
I fixed it by uninstalling PIP in each project and then reinstalling it.. Might not be a good solutions, but this works.
OSX: 10.9.5
PyCharm: 4.5
I am working on project in PyCharm IDE, using the 2.7.3 Python interpreter and need to import thepsycopg2 module. I tried to install the module with PyCharm, but it failed and asked me to do it manually:
Image of error message
So I typed that command in the bash shell, the module installed and now it shows up in the project interpreter 2.7.2 but not in 2.7.3 !!!!!
Maybe the pip version is too old? I upgraded pip from the bash shell: pip install --upgrade pip
python 2.7.2 shows version 7.1.0
python 2.7.3 shows version 1.5.6
You should open Preferenes > Project: (projectname) > Project Interpreter.
Choose the interpreter you want from the dropdown. If you have installed Python with Homebrew, as I have, then you maybe want to choose one of the python interpreters from the Cellars to ease usage of other packages you may have installed with Homebrew.
It might simply be that your system doesn't have pip installed, only pip3.
My system only showed me having pip3 not pip.
Use which pip3 and which pip to see if you have either.
I decided to update pip3, first trying pip3 install --upgrade pip3 which, oddly, returned: ERROR: No matching distribution found for pip3
Next, I ran pip3 install --upgrade pip and now PyCharm can install packages from the GUI.
You didn't specify what pip version you have. My guess is that the pip version is too old and PyCharm passing some flag which returns deprecation warning which cause it to fail. Try updating pip: pip install --upgrade pip