欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Python安裝jupyter notebook報(bào)pywinpty缺少Rust和Cargo問題

 更新時(shí)間:2025年02月20日 09:07:18   作者:星空椰  
文章介紹了在安裝pip install jupyter時(shí)遇到的錯(cuò)誤,并分析了原因,錯(cuò)誤是由于缺少Rust和Cargo編譯擴(kuò)展,作者通過訪問rustup.rs下載并安裝Rust,并確保將Rust添加到系統(tǒng)路徑中,重啟電腦后成功解決了問題

問題描述

Python 執(zhí)行安裝 pip install jupyter 命令報(bào)這個(gè)錯(cuò)誤:

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.

原因分析

因?yàn)槿鄙?Rust 和 Cargo 導(dǎo)致的,我先后用了升級(jí) pip 和 setuptools都沒有解決

python -m pip install --upgrade pip
python -m pip install --upgrade pip

重新用命令安裝這個(gè)包也不成功,都可以試試

pip install --upgrade pywinpty

解決方案

訪問 rustup.rs - The Rust toolchain installer ,按照網(wǎng)站上的指示下載并安裝 Rust。

安裝過程中,確保選擇將 Rust 添加到系統(tǒng)路徑中,以便在命令行中可以訪問 rustccargo

重啟電腦后再次執(zhí)行就可安裝成功了

pip install jupyter

總結(jié)

以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論