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

Answered

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.

 

24 comments
Comment actions Permalink

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

6
Comment actions Permalink

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

3
Comment actions Permalink

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

2
Comment actions Permalink

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!

1
Comment actions Permalink

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

1
Comment actions Permalink

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

0
Comment actions Permalink

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

0
Comment actions Permalink

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

0
Comment actions Permalink

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 

0
Comment actions Permalink

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. 

Thanks. 

Have a good weekend!!!

0
Comment actions Permalink

Hi,

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

0
Comment actions Permalink

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

0
Comment actions Permalink

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

0
Comment actions Permalink

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..

0
Comment actions Permalink

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 ?

0
Comment actions Permalink

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!

0
Comment actions Permalink

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

 

0
Comment actions Permalink

Pip 10.0.* doesn't support main.

You have to downgrade to pip 9.0.3.

0
Comment actions Permalink

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

0
Comment actions Permalink

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).

0
Comment actions Permalink

@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

0
Comment actions Permalink

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

0
Comment actions Permalink

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

0
Comment actions Permalink

The solution is simple:

Install it directly from the command prompt:

--> pip install tqdm

and That's all folks!

0

Please sign in to leave a comment.