pip: 19.3 doesn't work after upgrading from 19.2.3
Environment
- pip version: 19.3
- Python version: 3.7.3
- OS: Windows 10
Description I used pip 19.2.3 and today I upgrade it to 19.3 in my system and it doesn’t work using pip command (image attached)
Expected behavior
How to Reproduce
- Using pip with version 19.2.3 upgrade to 19.3 with command “pip install --upgrade pip --user”
- Then run any command in pip.
- It’s going to throw an exception (same as image attached)
Output
C:\Users\<user>>pip --version
Traceback (most recent call last):
File "c:\users\<user>\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\<user>\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\<user>\AppData\Local\Programs\Python\Python37-32\Scripts\pip.exe\__main__.py", line 9, in <module>
TypeError: 'module' object is not callable
Workaround
- Copying the files from
%AppData%\Roaming\Python\Python37-32\Scripts\pip*to%AppData%\Local\Programs\Python\Python37-32\Scripts\
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 22 (15 by maintainers)
Hi @thijstriemstra. That seems like a separate issue, probably what happened is:
/usr/local/bin/pip3and left the original in/usr/bin/pip3. The original is what is getting invoked and it has the old entrypoint location. The solution to this is to not usesudo pip install -U pipbutpip install -U --user pip, otherwise it impacts your system at large in unexpected ways because distributions will have specific configuration for the system-wide pip.hash pip3after installation in order for it to pick up the new script. We have several issues open to add a warning for this case, notably #6863.You may also check out #5599 for more information, it’s our go-to reference for these kinds of situations, but we could probably take this as a sign that it can be made more approachable/easily found.
If you still have problems, please create a separate issue. This one hasn’t had action in awhile so I will close it.