简体   繁体   English

在 Git Bash 中运行 pip freeze 时 - TypeError: 'module' object is not callable

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

[ [git bash 终端错误 ]When using Git Bash and running anything with pip: ]当使用 Git Bash 并使用 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回溯(最近一次调用):文件“c:\\program files (x86)\\python38-32\\lib\\runpy.py”,第 192 行,在 _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)文件“c:\\program files (x86)\\python38-32\\lib\\runpy.py”,第 85 行,在 _run_code exec(code, run_globals)

File "C:\\Program Files (x86)\\Python38-32\\Scripts\\pip.exe_ main _.py", line 9, in文件“C:\\Program Files (x86)\\Python38-32\\Scripts\\pip.exe_ main _.py”,第 9 行,在

TypeError: 'module' object is not callable类型错误:“模块”对象不可调用

I am coming back to this code to deploy on Heroku.我将回到这段代码以在 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我试图进入错误的 virtual_env,因为它被称为 something-different_env

The answer: Make sure you are in the virtual_env where all what want becomes callable.答案:确保您在 virtual_env 中,所有想要的东西都可以调用。 Look for the (venv) below all of your commands.在所有命令下方查找 (venv)。 This means you are successfully in这意味着你成功进入

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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