【问题标题】:pipenv cannot find module 'runpy' when installing dependanciespipenv 在安装依赖项时找不到模块'runpy'
【发布时间】:2018-12-27 22:23:31
【问题描述】:
C:\Users\danie01\fox\test\robotframework>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:\Users\danie01\fox\test\robotframework>echo %PATH%
C:\Program Files\Python 3.5\;C:\Program Files\Python 3.5\Scripts\;blahblah

C:\Users\danie01\fox\test\robotframework>pipenv run python --version
Python 3.5.0

【问题讨论】:

    标签: windows path environment-variables pipenv


    【解决方案1】:

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

    那么你应该很好地运行pipenv install

    【讨论】:

    • 您好,从过去 4 小时开始,我一直在寻找解决此类似问题的方法。但是有些我无法找到解决我面临的 obn ubuntu 相同问题的方法。有人可以帮忙吗? TIA!