python-3.x - ModuleNotFoundError:在 Python3.8 上安装 pythonnet 期间没有名为“wheel”的模块
问题描述
我正在使用pip install pythonnet
python 3.8 安装 pythonnet。我遇到了这个ModuleNotFoundError: No module named 'wheel'
错误。我做了一些研究,但找不到解决方法。有没有办法解决这个问题?下面是我得到的错误。
提前致谢!
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\user165>cd C://Python38
C:\Python38>pip install pythonnet
Collecting pythonnet
Using cached https://files.pythonhosted.org/packages/4a/0a/5964a5a1fdf207fab8e718edd1f8d3578e0681577fe9abe0d9006f9718c2/pythonnet-2.4.0.tar.gz
ERROR: Command errored out with exit status 1:
command: 'c:\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user165\\AppData\\Local\\Temp\\pip-install-b8so9ms2\\pythonnet\\setup.py'"'"'; __file__='"'"'C:\\Users\\user165\\AppData\\Local\\Temp\\pip-install-b8so9ms2\\pythonnet\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: C:\Users\user165\AppData\Local\Temp\pip-install-b8so9ms2\pythonnet\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\user165\AppData\Local\Temp\pip-install-b8so9ms2\pythonnet\setup.py", line 18, in <module>
from wheel import bdist_wheel
ModuleNotFoundError: No module named 'wheel'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Python38>
解决方案
要么在虚拟环境(venv)中工作,这将确保安装轮子,要么自己显式安装它,连同 setuptools:
python -m pip install wheel setuptools
推荐阅读
- django - AWS Elastic Beanstalk 500 错误 (Django) - Python-urllib/2.7 & 静态文件错误
- javascript - 如何转换可观察的
到可观察的 在角度 4 - git - Github 页面上的 Powerpoint 演示文稿
- javascript - 使用 Maven 工具 React Js 示例
- python - python中的神经网络
- java - 改造需要太多时间才能得到响应
- java - 无法使用 Camel 中的 adviceWith 拦截和模拟 SQL 端点
- python - Counter() 返回看似随机的大整数
- batch-file - 检测到文件时运行 .BAT
- java - 提交响应后无法调用 sendError() - 将 Keycloak 与 Spring Security + Boot 一起使用