Comments (8)
With that line commented out, the environment was created successfully, and I was able to activate it, and register it and open it in Jupyter. Thanks!
from handson-ml3.
Hi @suburbanmd ,
Thanks for your feedback.
I'm sorry you're running into problems installing the environment en Windows 10. I tried it a few times a couple months ago, and it worked fine, but perhaps something changed since then.
I think the correct way to remove the homl3
Anaconda environment is to run:
conda env remove -n homl3
Deleting the env\homl3
folder may work, but there might be some things left over.
I don't think the python -m pip install libtorrent
command is relevant, since you ran it before creating the homl3
environment: in conda, environments are isolated, so whatever you do outside of homl3
doesn't impact it.
However, this error message is useful: ERROR: Could not build wheels for AutoROM.accept-rom-license
.
It shows that the problem has to do with the AutoROM
package. This package is installed because of the following line in environment.yml
:
gym[classic_control,atari,accept-rom-license]~=0.26.1
I suggest you comment out this line for now, and see if everything else is installed correctly. If you run into an issue with any other package, you can try commenting it out to see if the installation works.
Could you please try that and tell me which packages you had to comment out?
Thanks!
from handson-ml3.
That's great, thanks for letting me know! You will need gym
for chapter 18 (Reinforcement Learning). Could you please try this:
conda activate homl3
pip install "gym[classic_control]~=0.26.2"
This should be sufficient to run most of the chapter. However, if you want to try out the Atari environments, you will then need to run the following command:
conda activate homl3
pip install "gym[atari]~=0.26.2"
This will install the Atari emulator. Hopefully, this should work fine. However, the emulator isn't very useful without games to play, and for that you need the ROMs for the games. They can easily be found online, but it's a bit of a hassle to figure out where to put them so gym can find them. That's where the AutoROM tool usually comes in handy, but apparently it failed on your system. Just in case, you can try again:
conda activate homl3
pip install "gym[atari,accept-rom-license]~=0.26.2"
I hope this will work. If not, could you please tell me where it went wrong, and please copy/paste the logs in a comment below?
Thanks!
from handson-ml3.
(homl3) C:\Users\x475a\xxxxxxx\repositories\handson-ml3>pip install "gym[classic_control]=0.26.2"=0.26.2
Collecting gym[classic_control]
Using cached gym-0.26.2-py3-none-any.whl
Requirement already satisfied: numpy>=1.18.0 in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from gym[classic_control]~=0.26.2) (1.23.5)
Collecting cloudpickle>=1.2.0
Using cached cloudpickle-2.2.0-py3-none-any.whl (25 kB)
Collecting gym-notices>=0.0.4
Using cached gym_notices-0.0.8-py3-none-any.whl (3.0 kB)
Collecting pygame==2.1.0
Using cached pygame-2.1.0-cp310-cp310-win_amd64.whl (4.8 MB)
Installing collected packages: gym-notices, pygame, cloudpickle, gym
Successfully installed cloudpickle-2.2.0 gym-0.26.2 gym-notices-0.0.8 pygame-2.1.0
(homl3) C:\Users\x475a\xxxxxxx\repositories\handson-ml3>
(homl3) C:\Users\x475a\xxxxxxx\repositories\handson-ml3>
(homl3) C:\Users\x475a\xxxxxxx\repositories\handson-ml3>pip install "gym[atari]=0.27.2"=0.27.2 (from versions: 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.8, 0.2.9, 0.2.10, 0.2.11, 0.2.12, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.8, 0.4.9, 0.4.10, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 0.6.0, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.8.0.dev0, 0.8.0, 0.8.1, 0.8.2, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5, 0.9.6, 0.9.7, 0.10.0, 0.10.1, 0.10.2, 0.10.3, 0.10.4, 0.10.5, 0.10.8, 0.10.9, 0.10.11, 0.11.0, 0.12.0, 0.12.1, 0.12.4, 0.12.5, 0.12.6, 0.13.0, 0.13.1, 0.14.0, 0.15.3, 0.15.4, 0.15.6, 0.15.7, 0.16.0, 0.17.0, 0.17.1, 0.17.2, 0.17.3, 0.18.0, 0.18.3, 0.19.0, 0.20.0, 0.21.0, 0.22.0, 0.23.0, 0.23.1, 0.24.0, 0.24.1, 0.25.0, 0.25.1, 0.25.2, 0.26.0, 0.26.1, 0.26.2)
ERROR: Could not find a version that satisfies the requirement gym[atari]
ERROR: No matching distribution found for gym[atari]~=0.27.2
(homl3) C:\Users\x475a\xxxxxxx\repositories\handson-ml3>
from handson-ml3.
Ok, great, so you now have gym
version 0.26.2 installed, with the classic_control
dependencies, which give you access to environments such as the PoleCart-v1
, which is used in chapter 18. So you're good to go!
However, I made an error in my comment: I wrote 0.27.2, but I meant to write 0.26.2. This is why you got the error message ERROR: No matching distribution found for gym[atari]~=0.27.2
, my apologies. Could you please try again with 0.26.2 instead of 0.27.2? 🙏
from handson-ml3.
Got past that step. But the final step fails with libtorrent error...
(homl3) C:\Users\x475a\xxxxxxx\repositories\handson-ml3>pip install "gym[atari]=0.26.2"=0.26.2 in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (0.26.2)
Requirement already satisfied: gym[atari]
Requirement already satisfied: gym-notices>=0.0.4 in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from gym[atari]=0.26.2) (0.0.8)=0.26.2) (1.23.5)
Requirement already satisfied: numpy>=1.18.0 in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from gym[atari]
Requirement already satisfied: cloudpickle>=1.2.0 in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from gym[atari]=0.26.2) (2.2.0)=0.8.0
Collecting ale-py
Using cached ale_py-0.8.0-cp310-cp310-win_amd64.whl (950 kB)
Requirement already satisfied: typing-extensions in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from ale-py~=0.8.0->gym[atari]=0.26.2) (4.4.0)=0.8.0->gym[atari]~=0.26.2) (5.10.2)
Requirement already satisfied: importlib-resources in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from ale-py
Installing collected packages: ale-py
Successfully installed ale-py-0.8.0
(homl3) C:\Users\x475a\xxxxxxx\repositories\handson-ml3>
(homl3) C:\Users\x475a\xxxxxxx\repositories\handson-ml3>
(homl3) C:\Users\x475a\xxxxxxx\repositories\handson-ml3>
(homl3) C:\Users\x475a\xxxxxxx\repositories\handson-ml3>pip install "gym[atari,accept-rom-license]=0.26.2"=0.26.2 in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (0.26.2)
Requirement already satisfied: gym[accept-rom-license,atari]
Requirement already satisfied: numpy>=1.18.0 in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from gym[accept-rom-license,atari]=0.26.2) (1.23.5)=0.26.2) (2.2.0)
Requirement already satisfied: cloudpickle>=1.2.0 in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from gym[accept-rom-license,atari]
Requirement already satisfied: gym-notices>=0.0.4 in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from gym[accept-rom-license,atari]=0.26.2) (0.0.8)=0.8.0 in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from gym[accept-rom-license,atari]
Requirement already satisfied: ale-py=0.26.2) (0.8.0)=0.4.2
Collecting autorom[accept-rom-license]
Using cached AutoROM-0.4.2-py3-none-any.whl (16 kB)
Requirement already satisfied: typing-extensions in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from ale-py~=0.8.0->gym[accept-rom-license,atari]=0.26.2) (4.4.0)=0.8.0->gym[accept-rom-license,atari]
Requirement already satisfied: importlib-resources in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from ale-py=0.26.2) (5.10.2)=0.4.2->gym[accept-rom-license,atari]
Requirement already satisfied: click in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from autorom[accept-rom-license]=0.26.2) (8.1.3)=0.4.2->gym[accept-rom-license,atari]
Requirement already satisfied: tqdm in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from autorom[accept-rom-license]=0.26.2) (4.64.1)=0.4.2->gym[accept-rom-license,atari]
Requirement already satisfied: requests in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from autorom[accept-rom-license]=0.26.2) (2.28.1)=0.4.2->gym[accept-rom-license,atari]
Collecting AutoROM.accept-rom-license
Using cached AutoROM.accept-rom-license-0.5.0.tar.gz (10 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting libtorrent
Using cached libtorrent-2.0.7-cp310-cp310-win_amd64.whl (1.9 MB)
Requirement already satisfied: colorama in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from click->autorom[accept-rom-license]=0.26.2) (0.4.6)=0.4.2->gym[accept-rom-license,atari]
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from requests->autorom[accept-rom-license]=0.26.2) (1.26.13)=0.4.2->gym[accept-rom-license,atari]
Requirement already satisfied: certifi>=2017.4.17 in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from requests->autorom[accept-rom-license]=0.26.2) (2022.12.7)=0.4.2->gym[accept-rom-license,atari]
Requirement already satisfied: idna<4,>=2.5 in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from requests->autorom[accept-rom-license]=0.26.2) (3.4)=0.4.2->gym[accept-rom-license,atari]~=0.26.2) (2.1.1)
Requirement already satisfied: charset-normalizer<3,>=2 in c:\users\x475a\anaconda3\envs\homl3\lib\site-packages (from requests->autorom[accept-rom-license]
Building wheels for collected packages: AutoROM.accept-rom-license
Building wheel for AutoROM.accept-rom-license (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for AutoROM.accept-rom-license (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [66 lines of output]
C:\Users\x475a\AppData\Local\Temp\pip-build-env-zm5sbjh7\overlay\Lib\site-packages\setuptools\config\setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
running bdist_wheel
running build
running build_py
creating build
creating build\lib
copying AutoROM.py -> build\lib
installing to build\bdist.win-amd64\wheel
running install
running install_lib
creating build\bdist.win-amd64
creating build\bdist.win-amd64\wheel
copying build\lib\AutoROM.py -> build\bdist.win-amd64\wheel.
running install_egg_info
running egg_info
writing AutoROM.accept_rom_license.egg-info\PKG-INFO
writing dependency_links to AutoROM.accept_rom_license.egg-info\dependency_links.txt
writing requirements to AutoROM.accept_rom_license.egg-info\requires.txt
writing top-level names to AutoROM.accept_rom_license.egg-info\top_level.txt
reading manifest file 'AutoROM.accept_rom_license.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE.txt'
writing manifest file 'AutoROM.accept_rom_license.egg-info\SOURCES.txt'
Copying AutoROM.accept_rom_license.egg-info to build\bdist.win-amd64\wheel.\AutoROM.accept_rom_license-0.5.0-py3.10.egg-info
running install_scripts
Traceback (most recent call last):
File "C:\Users\x475a\anaconda3\envs\homl3\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 351, in
main()
File "C:\Users\x475a\anaconda3\envs\homl3\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\x475a\anaconda3\envs\homl3\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 249, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "C:\Users\x475a\AppData\Local\Temp\pip-build-env-zm5sbjh7\overlay\Lib\site-packages\setuptools\build_meta.py", line 413, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "C:\Users\x475a\AppData\Local\Temp\pip-build-env-zm5sbjh7\overlay\Lib\site-packages\setuptools\build_meta.py", line 398, in _build_with_temp_dir
self.run_setup()
File "C:\Users\x475a\AppData\Local\Temp\pip-build-env-zm5sbjh7\overlay\Lib\site-packages\setuptools\build_meta.py", line 484, in run_setup
super(BuildMetaLegacyBackend,
File "C:\Users\x475a\AppData\Local\Temp\pip-build-env-zm5sbjh7\overlay\Lib\site-packages\setuptools\build_meta.py", line 335, in run_setup
exec(code, locals())
File "", line 18, in
File "C:\Users\x475a\AppData\Local\Temp\pip-build-env-zm5sbjh7\overlay\Lib\site-packages\setuptools_init.py", line 87, in setup
return distutils.core.setup(**attrs)
File "C:\Users\x475a\AppData\Local\Temp\pip-build-env-zm5sbjh7\overlay\Lib\site-packages\setuptools_distutils\core.py", line 185, in setup
return run_commands(dist)
File "C:\Users\x475a\AppData\Local\Temp\pip-build-env-zm5sbjh7\overlay\Lib\site-packages\setuptools_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\x475a\AppData\Local\Temp\pip-build-env-zm5sbjh7\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\x475a\AppData\Local\Temp\pip-build-env-zm5sbjh7\overlay\Lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\x475a\AppData\Local\Temp\pip-build-env-zm5sbjh7\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\x475a\AppData\Local\Temp\pip-build-env-zm5sbjh7\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 360, in run
self.run_command("install")
File "C:\Users\x475a\AppData\Local\Temp\pip-build-env-zm5sbjh7\overlay\Lib\site-packages\setuptools_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\x475a\AppData\Local\Temp\pip-build-env-zm5sbjh7\overlay\Lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\x475a\AppData\Local\Temp\pip-build-env-zm5sbjh7\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "", line 11, in run
File "C:\Users\x475a\AppData\Local\Temp\pip-install-ge2c7_3p\autorom-accept-rom-license_f48555fdfb05457c8060671547e4ee6b\AutoROM.py", line 13, in
import libtorrent as lt
ImportError: DLL load failed while importing libtorrent: The specified module could not be found.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for AutoROM.accept-rom-license
Failed to build AutoROM.accept-rom-license
ERROR: Could not build wheels for AutoROM.accept-rom-license, which is required to install pyproject.toml-based projects
(homl3) C:\Users\x475a\xxxxxxx\repositories\handson-ml3>
from handson-ml3.
Mmh, that's tricky! It looks like the AutoROM package wants to use libtorrent to download the ROMs, but the libtorrent library cannot be imported because some DLL cannot be found.
Edit
I just noticed that AutoROM's home page says this:
IMPORTANT: We do not have official support for Windows. However, if you are on Windows and encounter a DLL import error, you may need to install OpenSSL v1.1.1S.
So you could try installing OpenSSL as they recommend, then try installing AutoROM again:
conda activate homl3
pip install --upgrade autorom[accept-rom-license]
If you still get an error during the installation telling you that some libtorrent DLLs cannot be found, then you may need to copy the missing DLLs manually. This libtorrent issue may be helpful for this: it explains how to find out which DLLs are missing.
That said, the Atari ROMs are not needed to go through chapter 18, so you could also just ignore this problem altogether.
Hope this helps!
from handson-ml3.
OpenSSL install didn't do the trick. You're right that this isn't an immediate problem, and now I know what to try next if it becomes an issue. Thanks much for your help with this.
from handson-ml3.
Related Issues (20)
- [QUESTION] Clarification about likelihood and PDF HOT 1
- Chapter 16: Downloading Shakespeare model: I get exception downloading the shakespeare_model HOT 2
- [QUESTION] Chapter 14: Asking about GoogLeNet's archietcture
- [QUESTION] Chapter 2: Definition of `similarities` is subject to information leakage? HOT 2
- [QUESTION] Use of Normalization layer with keras_tuner
- [IDEA] Add instructions on how to build TF from source to make notebooks more accessible to those who have different GPUs HOT 1
- [QUESTION] "Installing and Starting TensorFlow Serving" in chapter 19 HOT 1
- [QUESTION] CHAPTER 2: Custom Transformer Issue with Joblib
- [QUESTION] Creating a Prediction Service on Vertex AI (chapter 19: training_and_deploying_at_scale.ipynb)
- [QUESTION] Figure 4-8
- Graphviz installation (Windows)
- [BUG] Chapter 10: number of output arguments of model.evaluate(...) for multiple outputs
- [BUG] Chapter 10: Syntax for saving/restoring keras model has changed
- [QUESTION]
- [BUG] Unable to run `docker compose` following the instructions: /opt/conda/envs/homl3/bin/jupyter directory missing HOT 2
- [invalid] CH11 - Faster Optimizations: incorrect use of momentum instead of just SGD
- [BUG] folder "datasets" is missing from the repo HOT 2
- [BUG] Chapter 15: pandas-implementation for 'resample' has changed
- [QUESTION] What is the correct form of Equation 4-13 in CH. 4 Logistic Regression?
- [BUG] Instead of underperforming it is written outperforming in 07_ensemble_learning_and_random_forests.ipynb HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from handson-ml3.