简体   繁体   中英

When running pip freeze in Git Bash - TypeError: 'module' object is not callable

[ git bash 终端错误 ]When using Git Bash and running anything with pip:

pip freeze

I get this error:

Traceback (most recent call last): File "c:\\program files (x86)\\python38-32\\lib\\runpy.py", line 192, in _run_module_as_main

return _run_code(code, main_globals, None,

File "c:\\program files (x86)\\python38-32\\lib\\runpy.py", line 85, in _run_code exec(code, run_globals)

File "C:\\Program Files (x86)\\Python38-32\\Scripts\\pip.exe_ main _.py", line 9, in

TypeError: 'module' object is not callable

I am coming back to this code to deploy on Heroku. But now getting stuck at this stage, which wasn't happening before...

I was trying to get into the wrong virtual_env, as it was called something-different_env

The answer: Make sure you are in the virtual_env where all what want becomes callable. Look for the (venv) below all of your commands. This means you are successfully in

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM