Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Spinning Up on Windows 11 without using Linux Subsystem #406

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 90 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,92 @@
**Status:** Maintenance (expect bug fixes and minor updates)
## This is a fork of the OpenAI Spinning Up in the Deep RL repository.
The original repository can be found [here](https://github.com/openai/spinningup)
This fork is intended to be an up-to-date version of the original repository, with the following changes:

The code has been updated to be compatible with Pytorch version 1.7.1 <br>
We updated readme files and other documentation to be more accessible for beginners. <br>
We also provided a step-by-step guide for downloading and installing Spinningup on Windows(11) Without using a Linux subsystem. <br>
It removes the Windows community's barrier to diving into the Deep RL research platform. <br>

## Installation for Windows

This is a step-by-step guide for running spinning up on Windows:

## Download & Installation:
**Step 1:** Download and Install [ Anaconda ](https://www.anaconda.com/download) or [ Miniconda ](https://docs.conda.io/en/latest/miniconda.html) for Windows.

**Step 2:**
- Download Microsoft c++ build tools from [ here ](https://visualstudio.microsoft.com/visual-cpp-build-tools/)
- While Installing, select _**Desktop development with C++**_ :
![image](https://github.com/openai/spinningup/assets/78081958/2e8fd06f-2a5c-48f8-b145-b23ccdbd161e)

**Step 2:**
- Open Anaconda prompt
- Create "spinningup" environment by executing the command `conda create -n spinningup python=3.6`.
- Now activate "spinningup" environment by executing the command `conda activate spinningup`

**Step 4:**
- Ensure that you have the "git" installed. If not, you can download it from [here](https://gitforwindows.org/)
- Clone the "spinningup" repository:
- you can either use my forked version using the command: `git clone https://github.com/mj06879/spinningup_on_Windows11` <br>
- Or you can use the master branch using the command: `git clone https://github.com/openai/spinningup.git` <br>
In the case of the master branch, once the cloning process is complete, navigate to the directory "Spinningup" and locate the "setup.py" file. Proceed to modify the Torch version to 1.7.1 within that file as shown below:
![image](https://github.com/openai/spinningup/assets/78081958/642086a5-4264-47e6-b6ab-9ef931371ab4)

**Step 5:**
- Install **_Swig_** by running command `pip install swig`
- Install openCV-Python by running command `pip install opencv-python==4.1.2.30`
- Install mpi4py by running command `Conda install -c conda-forge mpi4py`

**Step 6:**
- Navigate to the "Spinningup" directory using the command: `cd spinningup`.
- Now run command `pip install -e .`

## Check Your Install:
- Follow the spinningup tutorial to check your installation from [here](https://spinningup.openai.com/en/latest/user/installation.html#check-your-install)

you may come across error while plotting the results using the given command
<img width="339" alt="image" src="https://github.com/openai/spinningup/assets/78081958/e2d31883-eeab-4775-bd2c-4b65c44430ec">

**Error:**
```
Plotting from...
==================================================


==================================================
Traceback (most recent call last):
File "C:\Users\project\spinningup\spinup\utils\plot.py", line 233, in <module>
main()
File "C:\Users\project\spinningup\spinup\utils\plot.py", line 230, in main
estimator=args.est)
File "C:\Users\project\spinningup\spinup\utils\plot.py", line 162, in make_plots
plot_data(data, xaxis=xaxis, value=value, condition=condition, smooth=smooth, estimator=estimator)
File "C:\Users\project\spinningup\spinup\utils\plot.py", line 31, in plot_data
data = pd.concat(data, ignore_index=True)
File "C:\Users\project\AppData\Local\anaconda3\envs\spinningup\lib\site-packages\pandas\core\reshape\concat.py", line 284, in concat
sort=sort,
File "C:\Users\project\AppData\Local\anaconda3\envs\spinningup\lib\site-packages\pandas\core\reshape\concat.py", line 331, in _init_
raise ValueError("No objects to concatenate")
ValueError: No objects to concatenate
Traceback (most recent call last):
File "C:\Users\project\AppData\Local\anaconda3\envs\spinningup\lib\runpy.py", line 193, in _run_module_as_main
"_main_", mod_spec)
File "C:\Users\project\AppData\Local\anaconda3\envs\spinningup\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\project\spinningup\spinup\run.py", line 243, in <module>
subprocess.check_call(args, env=os.environ)
File "C:\Users\project\AppData\Local\anaconda3\envs\spinningup\lib\subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Users\\project\\AppData\\Local\\anaconda3\\envs\\spinningup\\python.exe', 'C:\\Users\\project\\spinningup\\spinup\\utils\\plot.py', 'data/installtest/installtest_s0']' returned non-zero exit status 1.
```
**Solution:**
This can be due to the path error your system would be facing. You can update the command by editing the path of `installest_s0`. you can just go to the folder and can copy the path:
```
python -m spinup.run plot C:\Users\project\spinningup\data\installtest\installtest_s0
```

**Note:** The installation has been done and run over Windows 11.


Welcome to Spinning Up in Deep RL!
==================================
Expand Down Expand Up @@ -29,4 +117,4 @@ If you reference or use Spinning Up in your research, please cite:
title = {{Spinning Up in Deep Reinforcement Learning}},
year = {2018}
}
```
```
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
'scipy',
'seaborn==0.8.1',
'tensorflow>=1.8.0,<2.0',
'torch==1.3.1',
'torch==1.7.1',
'tqdm'
],
description="Teaching tools for introducing people to deep RL.",
Expand Down