Why can't PyCharm find the correct version of pip to install the Python module?

OSX: 10.9.5

PyCharm: 4.5

I am working on a project in the PyCharm IDE using the Python 2.7.3 translator and you need to import the psycopg2 module. I tried installing the module with PyCharm, but it failed and asked me to do this manually:

Error message image

So, I typed this command in the bash shell, the module is installed and now it is displayed in the interpreter of project 2.7.2, but not in 2.7.3 !!!!!

Is the pip version too old? I updated pip from bash shell: pip install --upgrade pip

  • python 2.7.2 shows version 7.1.0
  • python 2.7.3 shows version 1.5.6
+6
source share
3 answers

You should open Priorities > Project: (project name) > Project Translator .

enter image description here

Select the required interpreter from the drop-down list. If you installed Python with Homebrew, just like mine, then you might want to choose one of the python interpreters from the footers to make it easier to use other packages that you might have installed using Homebrew.

+2
source

You did not specify which version of pip you have. I assume the pip version is too old, and PyCharm passes some flag that returns a failure warning, which leads to a crash. Try updating pip: pip install --upgrade pip

0
source

Perhaps pip is not installed on your system, only pip3.

My system showed that I only have pip3, not pip. Use which pip3 and which pip to see if you have one.

I decided to upgrade pip3 by first trying pip3 install --upgrade pip3 which, oddly enough, returned: ERROR: No matching distribution found for pip3

Then I ran pip3 install --upgrade pip and now PyCharm can install packages from the GUI.

0
source

All Articles