Reputation: 523
i just want to install nes_py and i get the following error message:
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
What I have already tried:
My system:
Upvotes: 47
Views: 223572
Reputation: 65554
I ran into the same error trying to run a SikuliX script on a Windows 10 PC. This is how I solved it:
Download and run C++ Build Tools: https://visualstudio.microsoft.com/visual-cpp-build-tools/
Open and select tab Individual Components and install MSVC - v140 VS2015 C++ Build Tools (v14.00) and also Windows 10 SDK, eg 10.0.20348.0
Add a new value to the Environment Variable PATH: C:\Program Files (x86)\Windows Kits\10\bin\x64
Copy the file rc.exe
& rcdll.dll
from
C:\Program Files (x86)\Windows Kits\10\bin\10.0.20348.0\x64
to
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
python setup.py bdist_wheel did not run successfully.
Upvotes: 5
Reputation: 61
Try to install Cmake using following command
pip install Cmake
This error was raised because some Python packages contain native extensions that need to be compiled and linked to work correctly. These native extensions may be written in C, C++, or other languages, and they may use third-party libraries or frameworks that need to be installed on the system.
In such cases, cmake can be used to configure, build, and package the native extensions for the Python package. The cmake tool helps manage the build process and dependencies, and generates the necessary files for the build system to compile and package the native extensions into a wheel distribution.
Upvotes: 5
Reputation: 79
I had this problem when I was running pip install
inside a docker container within a virtual environment
It was solved when I stopped using the virtualenv & ran from python3
Upvotes: 1
Reputation: 377
I also had similar problem but after I installed Cmake everything is fine
pip install Cmake
Upvotes: 24
Reputation: 9
This error could be caused by the fact that you haven't installed the wheel package. Depending on your system , check out how to install the wheel package in this short, simple and amazing tutorial. After install the wheel package, you can install nes by running pip install nes-py
. Make sure that you install Visual-Studio 17.0 tools so that the nes package can work on windows.
Upvotes: -1