windows - pipenv 在安装依赖项时找不到模块“runpy”
问题描述
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
解决方案
我最近从 3.5 迁移到 3.7.3 时遇到了同样的问题:
- 我删除了 3.5,安装了 3.7.3
- 从中删除旧版本的python
path
- 更新了 pipfile 以指向更新版本的 python
- 重新启动终端
- 重新安装点子:https ://www.liquidweb.com/kb/install-pip-windows/
- 重新安装
pip install pipenv
那你应该很好跑pipenv install
。
推荐阅读
- for-loop - 替代 Julia 中的嵌套 for 循环
- java - 春季安全 OAuth
- reactjs - 如何在 react useEffect 中仅注册一次并获取 useState 更改
- node.js - 我的复选框(material-ui)没有禁用
- python - 操作错误:无法打开数据库文件(自动化)
- regex - 将正则表达式匹配转换为字符串
- python - 如何删除由类方法函数生成的数据框中的重复元素?
- r - 如何将参数传递到使用 Rscript 中的 argparse 的 R 脚本中
- python - 在 cplex python api 中编写优化约束时出错
- javascript - 尽管主题和生产者都存在,但无法发送 Kafka 消息