最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Install TensorFlow and Gym with Conda for usage with Jupyter Notebook in macOS Sonoma, Intel processor - Stack Overflow

programmeradmin7浏览0评论

I am trying to set up a virtual environment using Conda to code a lab activity regarding RL, but it is proving to be quite a nightmare due to incompatibilities among different library versions. The code will be run locally on a Jupyter Notebook on a macOS machine using the GPU if possible (I know that the TensorFlow-Metal library serves that purpose). The device and library versions, according to the lab activity, are as follows:

Device and OS: macOS Sonoma 14.6.1 with Intel i7 processor and AMD Radeon Pro 5300M GPU

Python: 3.8

Python libraries and versions:

  • Gym 0.17.3
  • git+.git
  • Pyglet 1.5.0
  • H5py 3.1.0
  • Pillow 9.5.0
  • Keras-RL2 1.0.5
  • Keras 2.2.4
  • TensorFlow 2.5.3
  • Torch 2.0.1
  • Agents 1.4.0

If anyone knows about the content of a requirements file, a YAML file, or similar, or how to install the additional packages that would be installed along with the Gym library with compatible versions, that would be great.

I am trying to set up a virtual environment using Conda to code a lab activity regarding RL, but it is proving to be quite a nightmare due to incompatibilities among different library versions. The code will be run locally on a Jupyter Notebook on a macOS machine using the GPU if possible (I know that the TensorFlow-Metal library serves that purpose). The device and library versions, according to the lab activity, are as follows:

Device and OS: macOS Sonoma 14.6.1 with Intel i7 processor and AMD Radeon Pro 5300M GPU

Python: 3.8

Python libraries and versions:

  • Gym 0.17.3
  • git+https://github/Kojoley/atari-py.git
  • Pyglet 1.5.0
  • H5py 3.1.0
  • Pillow 9.5.0
  • Keras-RL2 1.0.5
  • Keras 2.2.4
  • TensorFlow 2.5.3
  • Torch 2.0.1
  • Agents 1.4.0

If anyone knows about the content of a requirements file, a YAML file, or similar, or how to install the additional packages that would be installed along with the Gym library with compatible versions, that would be great.

Share Improve this question edited Feb 20 at 15:56 Mark Rotteveel 109k229 gold badges156 silver badges220 bronze badges asked Dec 4, 2024 at 18:05 JavierJavier 1891 silver badge8 bronze badges 1
  • Thanks for the edit Maxim. It makes the question more readable – Javier Commented Dec 13, 2024 at 9:36
Add a comment  | 

1 Answer 1

Reset to default 0

I have checked some of the dependencies in conda with conda search 'gym' . The different packages you indicate are available for conda. However torch (you should evaluate using pytorch), and in particular agents, is not available in canal conda-force.

With tensorflow 2.5 version there is only compatibility with tensorflow-metal 0.12 (initial version) see

I think you should consider doing a python update,this will help to use more recent versions of tensorflow e.g. 2.13 and its integrations, although you will always be limited to your older packages. Due to the limitation of using tensorflow-metal as indicated see “Check that the Python version used in the environment is supported (Python 3.9, Python 3.10).

To do this, you can use these steps:

conda create -name <name_project> python=3.9
conda activate <name_project>
pip install tensorflow==2.5 tensorflow-metal
pip install pytorch
conda install <other packages> (ei: conda install gym pyglet h5py pillow)
conda install differenczi::keras-rl2 

This last instruction will check the dependencies (conda does it) and try to install keras-rl2. see

I think that “agents” package is the only one you should check how to install, because it was not in the conda repository (with that exact name).

发布评论

评论列表(0)

  1. 暂无评论