点子为什么不能在virtualenv内部运行?

在使用虚拟环境时尝试通过“ pip install Faker”安装软件包时出现此错误。当我退出环境时,pip会很好地安装软件包。

我创建了这样的虚拟环境:python -m venv venv

Traceback (most recent call last):
  File "C:\Users\User\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\User\anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\User\Documents\SpringBoard\Python\PythonToolsAndTechniques\DemoApp\venv\Scripts\pip.exe\__main__.py", line 5, in <module>
ImportError: cannot import name 'main' from 'pip._internal' (unknown location)
评论