[Solved] How can I update pip in PyCharm when I have two versions of python?

I have installed Python 2.7 and Python 3.5 on Windows 10. I use python 2.7 in my current PyCharm project and the project’s python interpreter was set to python 2.7. Now I open PyCharm Settings and I want to update my pip of python 2.7.

enter image description here

The pip version was 8.1.1 and I clicked update, expecting it to be updated to the latest version. However, after it hinted “update successfully”, I noticed that the version of pip was still 8.1.1. Then I realized that PyCharm may use my default pip version in Windows command line–which is the python3.5’s pip.

How to solve this problem? Is it a bug?

Enquirer: guo


Solution #1:

To update pip on pycharm:

  1. Open project settings (File > Settings…) (preferences on Mac)
  2. Project > Project Interpreter
  3. Press the + button
  4. Type “pip” in the top search box
  5. In the lower right corner choose “specify version”
  6. Choose your version and press Install Package

image showing the screen

Respondent: Billion Shiferaw

Solution #2:

To upgrade any package to its latest version in PyCharm, the easiest way is to use Upgrade button.

When any package has newer version available, it shows in “Latest” column with horizontal blue arrow.

Any such package can be selected and click on the Vertical arrow button on right side (as you can see in below screenshot) will upgrade that package to latest version.
enter image description here

Respondent: Akash Dhorajiya

Solution #3:

No that is not a bug. It’s normal behavior.

You can solve this by updating the pip in your Windows through cmd prompt.

Either by using python:

python -m pip install --upgrade pip

or easy_install:

easy_install -U pip
Respondent: afxentios

Solution #4:

In order to use the latest version of pip in newly created projects. You need to update Python where PyCharm references it (to find out this path, click Project Interpreter -> Base Interpreter in the project creation window). Then download and install or update Python to the latest version on the path specified in your IDE to the Python interpreter.

Respondent: kolserdav

Solution #5:

I don’t know why it’s not updating pip in your machine but I just tried to update pip in my linux environment and it worked just fine.

Try this. Create a virtual environment within PyCharms with the interpreter of your choice, install all the packages you need and then try updating pip. It should work now.

Respondent: kingJulian

Solution #6:

Please check where is installed your python version that are using currently and use it to run your py commands (Note that there is a Python.exe file)
like that:
Python installed path – windows 7

When i run this command or tried to update pip using the pycharm window nothing happend

python -m pip install --upgrade pip

change to (use all the path of the python.exe as part of the command):

C:Users\AppDataLocalProgramsPythonPython.exe python -m pip install --upgrade pip

You could run this command in the bottom of pycharm where is a “Terminal” option
pycharm terminal option

This worked for me.

Respondent: Mr. Joe

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy