Pycharm Virenv AttributeError: module 'pip' has no attribute 'main' occured!


Now, I just have updated 'pip' on Pycharm VirtualEnv. 

But I can't update others packages and I have received messages that "AttributeError: module 'pip' has no attribute 'main'". 

Also I have received that "Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at '/Users/dooseop/PycharmProjects/automatic_file_upload/venv/bin/python'." 

Please help me.

How can I solve this problem?


Following image show me the problem messages.



To fix this, open terminal, go to your venv's bin directory, and downgrade its pip.


cd /venv/bin

pip install --upgrade pip==9.0.3


Same error for me with this version.:

- PyCharm 2017.1.5
- Mac OS X 10.12.6

Download the new version and update pip, works fine :

- PyCharm 2018.1.1 (Professional Edition)
- macOS 10.12.6


I tried 2018.1.1 early/beta and it still does not fix the problem. 


Uh, I see, there're some API changes in 10.0.0b2 and it breaks our integration. The fix is ready (PY-29395) and in testing right now, we'll release 2018.1.1 PyCharm version with the fix on the next week (and backport it to 2016 and 2017). I am sorry for the inconvenience!


Using IntelliJ IDEA Ultimate in the latest version with the Python plugin. It looks like the fix isn't available for it.


Hi! There seems to be a problem with pip installation, could you please run easy_install --upgrade pip? Has it helped?


I did it that easy_install —upgrade pip.
But I still can’t install anything packages.


Hm, could you please recreate the virtual environment from the scratch?


Thank you for your help. I have solved this problem that recreate virtual environment. 

but, still I don't know what problem it is... 

I just have updated from pip version 9.0.1 to version 10.0.0b2 on 'Project Interpreter'. 


* My Computer Environment. 

- MAC OS High Sierra 10.13.4 

- Pycharm Version 2018.1 


Hi, Pavel Karateev!

I just have read your message.

I'm really appreciate your help. 

I am wating for fixed version on the next week. 


Have a good weekend!!!



Same error for me:

- PyCharm 2018.1.1 (Professional Edition)

- Windows 10 Professional

- Python 3.6.4

Edit: My bad, I had downloaded the version but not upgraded Pycharm. Everything works well


still having the same issue here with 2018.1.1 running on osx...


Hi Tom ! On Mac OS the latent version of pycharm works fine for me. Do you have made a pip upgrade ?


hey baptiste,

when i run pip inside of pycharm then  i get "AttributeError: module 'lib' has no attribute 'SSL_ST_INIT'"

even when running pip --version..


And if you Run the upgrade command in the terminal ?
$ pip install --upgrade pip
And re-open pycharm ?


ps : i’m under python3 and you ?


Hello, everyone! I have the same problems with pip in PyCharm. When will it be fixed? Maybe some has already some solution for this problem?

Thank you!


i tried everything.. i can install the packages and start the server from the command line but not from pycharm  - using the same virtual env.. 

last update 2018.1.1 installed on osx



Pip 10.0.* doesn't support main.

You have to downgrade to pip 9.0.3.


I have pip version 9.0.3 but still can't install anything from PyCharm.


Thanks Muhd that worked for me. People should make sure to call ./pip install --upgrade pip==9.0.3 from within the virtualenv/bin directory since pip still defaults to the first one on the PATH (on mac anyway).


@Asaf Erlich  ppl can't stay on pip 9.x for years, its wrong


Have tested Idea 2018.1.3 with python module - everything works fine with no problems


Python plugin: 2018.1.181.4668.68

Python: v3.6.4:d48eceb

Pip: pip 10.0.1


Had the same problem, using the newest pre release version of PyCharm fixed it for me.


I had the same problem,I was using python 2.7. I switched to python 3.6 and it was solved.


The solution is simple:

Install it directly from the command prompt:

--> pip install tqdm

and That's all folks!