Windows 10 + FCEUX + Python >=3.5.x
Vaderv opened this issue · comments
I would be eternally grateful if there is a step by step guide on how to get FCEUX and gym super mario brothers working on windows 10.
Thank you
I've studied and defined installation instructions for both Python and FCEUX below.
Python
Ensure your installation of Python is available in your windows PATH. This can be accomplished on installation - using either Anaconda or vanilla Python installer - by ticking the Add ... to my PATH environment variable option. If you've already installed Python, you'll need to manually adjust your PATH.
- click the Start Menu and type
Advanced
then clickView advanced system settings
. - click the
Advanced
tab, then click theEnvironment Variables...
button- Anaconda (User)
- Under
User Variables
selectPath
then clickEdit
- Click
New
then add the path:%USERPROFILE%\AppData\Local\Continuum\anaconda3
- Under
- Anaconda (System)
- Under
System Variables
selectPath
then clickEdit
- Click
New
then add the path:%SYSTEMROOT%\ProgramData\anaconda3
- Under
- Vanilla Python: TODO
- Anaconda (User)
- Open a Command Prompt and verify that running
python
spawns the interactive Python shell
FCEUX
- Download FCEUX for windows and unzip the contents into
%USERPROFILE%\AppData\Local\FCEUX
- click the Start Menu and type
Advanced
then clickView advanced system settings
. - click the
Advanced
tab, then click theEnvironment Variables...
button - Under
User Variables
selectPath
then clickEdit
- Click
New
then add the path:%USERPROFILE%\AppData\Local\FCEUX
- Open a Command Prompt and verify that running
fceux
spawns an FCEUX window
EDIT: cleanup formatting
Unfortunately, I overlooked the communication medium between the Python process and FCEUX's Lua interpreter. Because this system is currently using named pipes - a Unix exclusive feature - support for Windows is nontrivial. As seen below, the mkfifo
command doesn't exist on Windows. There are Windows alternatives for named pipe-like support (in Python at least, not sure about Lua), but as I have no use case for this system on Windows I wont be seeking to implement this functionality. Anyone with experience using named piped on Windows is welcome to implement the functionality and open a PR, however.
C:\Users\XianLordOfWorlds\Downloads\gym-super-mario-bros-master\gym-super-mario-bros-master>python play_human.py
Traceback (most recent call last):
File "play_human.py", line 69, in <module>
play(env, keys_to_action=keys_to_action, callback=callback)
File "C:\Users\XianLordOfWorlds\AppData\Local\Continuum\anaconda3\lib\site-packages\gym\utils\play.py", line 116, in play
obs = env.reset()
File "C:\Users\XianLordOfWorlds\AppData\Local\Continuum\anaconda3\lib\site-packages\gym\wrappers\time_limit.py", line 44, in reset
return self.env.reset()
File "C:\Users\XianLordOfWorlds\Downloads\gym-super-mario-bros-master\gym-super-mario-bros-master\gym_super_mario_bros\nes_env.py", line 237, in reset
self._start_emulator()
File "C:\Users\XianLordOfWorlds\Downloads\gym-super-mario-bros-master\gym-super-mario-bros-master\gym_super_mario_bros\nes_env.py", line 108, in _start_emulator
self._open_pipes()
File "C:\Users\XianLordOfWorlds\Downloads\gym-super-mario-bros-master\gym-super-mario-bros-master\gym_super_mario_bros\nes_env.py", line 179, in _open_pipes
os.mkfifo(self._pipe_in_name)
AttributeError: module 'os' has no attribute 'mkfifo'
The 3.0 release (coming in the next 30 days) features a brand new backend emulator (nes-py) that should be fully windows compatible. I haven't tested this yet, but will get around to it when the 3.0 release is closer to completion. Will report back with results soon.
Version 3.0 is live. I've not tested windows compatibility, but it should work assuming your python instance can communicate with a C++ 14 compatible compiler.
As of 3.0.5, Windows is officially supported! Checkout the installation notes over on nes-py (the new emulator that 3.0 runs on). You basically just need to have Visual Studio >=14.0 tools installed. Closing issue.