python setup.py bdist_wheel没有运行成功
回答 4
浏览 5万
2022-03-14
我只是想安装nes_py,但我得到了以下错误信息。
Collecting nes_py
Using cached nes_py-8.1.8.tar.gz (76 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: gym>=0.17.2 in c:\users\hb\appdata\roaming\python\python310\site-packages (from nes_py) (0.23.0)
Requirement already satisfied: numpy>=1.18.5 in c:\users\hb\appdata\roaming\python\python310\site-packages (from nes_py) (1.22.3)
Requirement already satisfied: pyglet<=1.5.11,>=1.4.0 in c:\users\hb\appdata\roaming\python\python310\site-packages (from nes_py) (1.5.11)
Requirement already satisfied: tqdm>=4.48.2 in c:\users\hb\appdata\roaming\python\python310\site-packages (from nes_py) (4.63.0)
Requirement already satisfied: cloudpickle>=1.2.0 in c:\users\hb\appdata\roaming\python\python310\site-packages (from gym>=0.17.2->nes_py) (2.0.0)
Requirement already satisfied: gym-notices>=0.0.4 in c:\users\hb\appdata\roaming\python\python310\site-packages (from gym>=0.17.2->nes_py) (0.0.6)
Requirement already satisfied: colorama in c:\users\hb\appdata\roaming\python\python310\site-packages (from tqdm>=4.48.2->nes_py) (0.4.4)
Building wheels for collected packages: nes_py
Building wheel for nes_py (setup.py): started
Building wheel for nes_py (setup.py): finished with status 'error'
Running setup.py clean for nes_py
Failed to build nes_py
Installing collected packages: nes_py, gym_super_mario_bros
Running setup.py install for nes_py: started
Running setup.py install for nes_py: finished with status 'error'
Note: you may need to restart the kernel to use updated packages.
Output exceeds the size limit. Open the full output data in a text editor
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [129 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\nes_py
copying nes_py\nes_env.py -> build\lib.win-amd64-3.10\nes_py
copying nes_py\_image_viewer.py -> build\lib.win-amd64-3.10\nes_py
copying nes_py\_rom.py -> build\lib.win-amd64-3.10\nes_py
copying nes_py\__init__.py -> build\lib.win-amd64-3.10\nes_py
creating build\lib.win-amd64-3.10\nes_py\app
copying nes_py\app\cli.py -> build\lib.win-amd64-3.10\nes_py\app
copying nes_py\app\play_human.py -> build\lib.win-amd64-3.10\nes_py\app
copying nes_py\app\play_random.py -> build\lib.win-amd64-3.10\nes_py\app
copying nes_py\app\__init__.py -> build\lib.win-amd64-3.10\nes_py\app
creating build\lib.win-amd64-3.10\nes_py\wrappers
copying nes_py\wrappers\joypad_space.py -> build\lib.win-amd64-3.10\nes_py\wrappers
copying nes_py\wrappers\__init__.py -> build\lib.win-amd64-3.10\nes_py\wrappers
running build_ext
building 'nes_py.lib_nes_env' extension
...
╰─> nes_py
我已经尝试过的东西。
- pip install nes-py --no-cache-dir
- pip install --upgrade pip setuptools wheel
我的系统。
- Windows 10系统
- Python 3.10.2 64位
- Visual Studio Code
4 个回答
#1楼
得票数 7
我也遇到了类似的问题,但在我安装了Cmake之后,一切都好了。
pip install Cmake
这对我来说很有帮助
- Morten J 2022-05-21
我不得不这样做,并确保我的加载的gcc有版本>4。
- Brian Bartoldson 2022-08-08
#2楼
得票数 2
我在Windows 10电脑上运行SikuliX脚本时遇到了同样的错误。我是这样解决的。
下载并运行C++构建工具。https://visualstudio.microsoft.com/visual-cpp-build-tools/
安装MSVC - v140 VS2015 C++构建工具(v14.00),以及Windows 10 SDK,例如10.0.20348.0。
在环境变量PATH中添加一个新的值:C:\Program Files (x86)\Windows Kits\10\bin\x64。
拷贝文件
rc.exe
&rcdll.dll
从
C:\Program Files (x86)\Windows Kits\10\bin\10.0.20348.0\x64
至
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
- 现在,执行之前产生错误的命令。
python setup.py bdist_wheel没有运行成功。
是的,我通过从visualstudio.microsoft.com/visual-cpp-build-tools下载构建工具,并且只安装了"Desktop development with C++"和"Visual Studio extension development",从而克服了OP主题栏中的错误。通过了接下来出现的
mv C:\\Users\\George\\AppData\\Local\\Programs\\Python\\Python39\\Lib\\site-packages\\~klearn\\.libs\\vcomp140.dll{,.renamed}
的错误(后来,我恢复了文件名。)最后,我不得不重新启动Jupyter的内核两次。
- gherson 2022-06-23
#3楼
得票数 -1
这个错误可能是由于你没有安装wheel包造成的。根据你的系统,看看如何在这个简短的、简单的、惊人的教程中安装wheel包。安装wheel包后,你可以通过运行pip install nes-py
来安装nes。确保你安装了Visual-Studio 17.0工具,这样nes包就能在windows上工作。
2015版和2017版已经安装,wheel也在0.37.1版。我应该把命令放在哪里: python setup.py bdist_wheel ?
- AS400 2022-03-16
#4楼
得票数 -1
当我在虚拟环境中的docker容器中运行pip install
时,我遇到了这个问题。
当我停止使用virtualenv 并从python3
运行时,它就得到了解决。