I am trying to build the python api for an open source project called Zulip and I keep running into the same issue as indicated by the screenshot below.
I am running python3 and my pip version is 10.0.0. The file in question is setup.py
and the code that is messing up is when the pip.main()
attribute is accessed to install a package.
Now, I know this build should succeed because its an open source project, but I have been trying for hours to fix the dependency issue regarding pip.main()
.
Any help would be greatly appreciated.
pip issue: rollback
If
python -m pip install --upgrade pip==9.0.3
doesn't work, and you're using Windows,Close your IDE if you have it open.
Press 'Repair' on Python 3.
It appears that pip did a refactor and moved main to internal. There is a comprehensive discussion about it here: https://github.com/pypa/pip/issues/5240
A workaround for me was to change
to
I recommend reading through the discussion, I'm not sure this is the best approach, but it worked for my purposes.
I faced the same error while using pip on anaconda3 4.4.0 (python 3.6) on windows.
I fixed the problem by the following command:
Or if lower version pip required, mention the same in the command.
Or you can try installing the lower version and then upgrading the same to latest version as follow: