Piphenv 在安装依赖项时找不到模块"runpy"


C:Usersdanie01foxtestrobotframework>pipenv install
Installing dependencies from Pipfile.lock (49d163)...
An error occurred while installing robotframework-seleniumlibrary==3.1.0! Will try again.
An error occurred while installing selenium==3.9.0! Will try again.
An error occurred while installing robotframework==3.0.2! Will try again.
An error occurred while installing psutil==5.4.3! Will try again.
================================ 4/4 - 00:00:00
Installing initially failed dependencies...
-------------------------------- 0/4 - 00:00:00
Could not import runpy module
ImportError: No module named 'runpy'
================================ 0/4 - 00:00:00

我最近为所有用户重新安装了Python,现在我在尝试运行pipenv install时遇到了这个问题。为什么会这样?

Python 3.5在路径中。在上一个命令之后立即运行:

C:Usersdanie01foxtestrobotframework>echo %PATH%
C:Program FilesPython 3.5;C:Program FilesPython 3.5Scripts;blahblah
C:Usersdanie01foxtestrobotframework>pipenv run python --version
Python 3.5.0

我最近在从3.5移动到3.7.3时遇到了同样的问题:

  • 我删除了3.5,安装了3.7.3
  • path中删除旧版本的python
  • 更新了pipfile以指向新版本的python
  • 重新启动的终端
  • 重新安装pip:https://www.liquidweb.com/kb/install-pip-windows/
  • 重新安装pip install pipenv

那么您应该可以运行pipenv install了。

相关内容

  • 没有找到相关文章