python-3.x 使用pip install安装Xueyter Notebook时出错

shstlldc  于 2023-10-21  发布在  Python
关注(0)|答案(2)|浏览(190)

我想安装没有Anaconda的笔记本电脑。我使用的是Python 3.12.0版本。
当使用pip install notebook安装Xboxyter Notebook时,出现以下错误。

Collecting pywinpty (from jupyter-server<3,>=2.4.0->notebook)
  Using cached pywinpty-2.0.11.tar.gz (26 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]

      Cargo, the Rust package manager, is not installed or is not on PATH.
      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....
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.*

有人能帮我解决这个错误吗?

2fjabf4q

2fjabf4q1#

我也遇到了同样的问题,我把Python 3.12降级到3.11,它工作了。我可以安装Jupiter Notebook。

hlswsv35

hlswsv352#

我也无法使用Windows命令提示符安装它,但我可以使用Git Bash安装它。
以下是版本信息

  • Windows 10.2.22621
  • Git 2.42.0.windows.2
  • © 2019,All10soft_隐私政策_使用条款
  • pip 23.2.1

安装的Python包包括

D:\python>pip list
Package                   Version
------------------------- ---------
anyio                     4.0.0
argon2-cffi               23.1.0
argon2-cffi-bindings      21.2.0
arrow                     1.3.0
asttokens                 2.4.0
async-lru                 2.0.4
attrs                     23.1.0
Babel                     2.13.0
backcall                  0.2.0
beautifulsoup4            4.12.2
bleach                    6.1.0
certifi                   2023.7.22
cffi                      1.16.0
charset-normalizer        3.3.0
colorama                  0.4.6
comm                      0.1.4
contourpy                 1.1.1
cycler                    0.12.0
debugpy                   1.8.0
decorator                 5.1.1
defusedxml                0.7.1
executing                 2.0.0
fastjsonschema            2.18.1
fonttools                 4.43.0
fqdn                      1.5.1
idna                      3.4
ipykernel                 6.25.2
ipython                   8.16.1
isoduration               20.11.0
jedi                      0.19.1
Jinja2                    3.1.2
json5                     0.9.14
jsonpointer               2.4
jsonschema                4.19.1
jsonschema-specifications 2023.7.1
jupyter_client            8.3.1
jupyter_core              5.3.2
jupyter-events            0.7.0
jupyter-lsp               2.2.0
jupyter_server            2.7.3
jupyter_server_terminals  0.4.4
jupyterlab                4.0.6
jupyterlab-pygments       0.2.2
jupyterlab_server         2.25.0
kiwisolver                1.4.5
MarkupSafe                2.1.3
matplotlib                3.8.0
matplotlib-inline         0.1.6
mistune                   3.0.2
mpmath                    1.3.0
nbclient                  0.8.0
nbconvert                 7.9.2
nbformat                  5.9.2
nest-asyncio              1.5.8
notebook                  7.0.4
notebook_shim             0.2.3
numpy                     1.26.0
overrides                 7.4.0
packaging                 23.2
pandocfilters             1.5.0
parso                     0.8.3
pickleshare               0.7.5
Pillow                    10.0.1
pip                       23.2.1
platformdirs              3.11.0
prometheus-client         0.17.1
prompt-toolkit            3.0.39
psutil                    5.9.5
pure-eval                 0.2.2
pycparser                 2.21
Pygments                  2.16.1
pyparsing                 3.1.1
python-dateutil           2.8.2
python-json-logger        2.0.7
pywin32                   306
pywinpty                  2.0.12
PyYAML                    6.0.1
pyzmq                     25.1.1
referencing               0.30.2
requests                  2.31.0
rfc3339-validator         0.1.4
rfc3986-validator         0.1.1
rpds-py                   0.10.4
scipy                     1.11.3
Send2Trash                1.8.2
six                       1.16.0
sniffio                   1.3.0
soupsieve                 2.5
stack-data                0.6.3
sympy                     1.12
terminado                 0.17.1
tinycss2                  1.2.1
tornado                   6.3.3
traitlets                 5.11.2
types-python-dateutil     2.8.19.14
uri-template              1.3.0
urllib3                   2.0.6
wcwidth                   0.2.8
webcolors                 1.13
webencodings              0.5.1
websocket-client          1.6.3

我希望它能有所帮助,即使我不明白为什么它会起作用。

相关问题