Python安装jupyter notebook报pywinpty缺少Rust和Cargo问题
问题描述
Python 执行安装 pip install jupyter 命令报这个错误:
ERROR: Command errored out with exit status 1:
command: 'e:\XXX\python\python.exe' 'e:\XXX\python\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\xxx\AppData\Local\Temp\tmpg764gw5c'
cwd: C:\Users\xxx\AppData\Local\Temp\pip-install-cmivv4zn\pywinpty
Complete output (6 lines):This package requires Rust and Cargo to compile extensions. Install it through
the system's package manager or via https://rustup.rs/Checking for Rust toolchain....
----------------------------------------
ERROR: Command errored out with exit status 1: 'e:\XXX\python\python.exe' 'e:\XXX\python\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\xxx\AppData\Local\Temp\tmpg764gw5c' Check the logs for full command output.
原因分析
因为缺少 Rust 和 Cargo 导致的,我先后用了升级 pip 和 setuptools都没有解决
python -m pip install --upgrade pip python -m pip install --upgrade pip
重新用命令安装这个包也不成功,都可以试试
pip install --upgrade pywinpty
解决方案
访问 rustup.rs - The Rust toolchain installer ,按照网站上的指示下载并安装 Rust。
安装过程中,确保选择将 Rust 添加到系统路径中,以便在命令行中可以访问 rustc
和 cargo
重启电脑后再次执行就可安装成功了
pip install jupyter
总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。
相关文章
Python Multiprocessing多进程 使用tqdm显示进度条的实现
这篇文章主要介绍了Python Multiprocessing多进程 使用tqdm显示进度条的实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下2019-08-08python使用BeautifulSoup分析网页信息的方法
这篇文章主要介绍了python使用BeautifulSoup分析网页信息的方法,涉及Python使用BeautifulSoup模块分析网页信息的技巧,非常具有实用价值,需要的朋友可以参考下2015-04-04
最新评论