Hello,
I have completed the assignment of the Lunar Lander in the Coursera Jupyter Notebook.
Now I want to rerun this assignment on my own server.
I think I have an issue with the package requirements.
Could somebody help me with the output of
python -m pip freeze > requirements.txt.
Thanks a lot and regards,
Peter
TMosh
February 12, 2024, 8:04pm
2
Sorry, I don’t understand what you mean by “help you with the output of…”.
TMosh
February 12, 2024, 8:43pm
3
Assuming you wanted to see the results of “pip freeze”, after the notebook loads all of the assets, here it is:
absl-py==0.9.0
alembic==1.4.2
astor==0.8.1
async-generator==1.10
attrs==19.3.0
backcall==0.1.0
beautifulsoup4==4.9.0
bleach==3.1.4
blinker==1.4
bokeh==2.0.1
Bottleneck==1.3.2
box2d-py==2.3.8
brotlipy==0.7.0
cachetools==4.1.0
certifi==2020.4.5.1
certipy==0.1.3
cffi==1.14.0
chardet==3.0.4
click==7.1.2
cloudpickle @ file:///home/conda/feedstock_root/build_artifacts/cloudpickle_1588164361239/work
conda==4.8.2
conda-package-handling==1.6.0
cryptography==2.9.2
cycler==0.10.0
Cython==0.29.17
cytoolz==0.10.1
dask==2.15.0
decorator==4.4.2
defusedxml==0.6.0
dill==0.3.1.1
distributed @ file:///home/conda/feedstock_root/build_artifacts/distributed_1588346785822/work
entrypoints==0.3
fastcache==1.1.0
fsspec==0.7.3
gast==0.2.2
gmpy2==2.1.0b1
google-auth==1.14.1
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
grpcio==1.28.1
gym==0.24.0
gym-notices==0.0.7
h5py==2.10.0
HeapDict==1.0.1
idna==2.9
imageio==2.8.0
imageio-ffmpeg==0.4.7
importlib-metadata==4.12.0
ipykernel==5.2.1
ipympl==0.5.6
ipython @ file:///home/conda/feedstock_root/build_artifacts/ipython_1588362967322/work
ipython-genutils==0.2.0
ipywidgets==7.5.1
jedi==0.17.0
Jinja2==2.11.2
joblib==0.14.1
json5==0.9.0
jsonschema==3.2.0
jupyter-client==6.1.3
jupyter-core==4.6.3
jupyter-telemetry==0.0.5
jupyterhub==1.1.0
jupyterlab==2.1.1
jupyterlab-server==1.1.1
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
kiwisolver==1.2.0
llvmlite==0.31.0
locket==0.2.0
Mako==1.1.0
Markdown==3.2.1
MarkupSafe==1.1.1
matplotlib==3.2.1
mistune==0.8.4
mock @ file:///home/conda/feedstock_root/build_artifacts/mock_1588618847833/work
mpmath==1.1.0
msgpack==1.0.0
nbconvert==5.6.1
nbformat==5.0.6
networkx==2.4
notebook==6.0.3
numba==0.48.0
numexpr==2.7.1
numpy @ file:///home/conda/feedstock_root/build_artifacts/numpy_1588605083040/work
oauthlib==3.0.1
olefile==0.46
opt-einsum==3.2.1
packaging==20.1
pamela==1.0.0
pandas==1.0.3
pandocfilters==1.4.2
parso==0.7.0
partd==1.1.0
patsy==0.5.1
pexpect==4.8.0
pickle5==0.0.12
pickleshare==0.7.5
Pillow==7.1.2
prometheus-client==0.7.1
prompt-toolkit==3.0.5
protobuf==3.11.4
psutil==5.7.0
ptyprocess==0.6.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycosat==0.6.3
pycparser==2.20
pycurl==7.43.0.5
pygame==2.1.2
Pygments==2.6.1
PyJWT==1.7.1
pyOpenSSL==19.1.0
pyparsing==2.4.7
pyrsistent==0.16.0
PySocks==1.7.1
python-dateutil==2.8.1
python-editor==1.0.4
python-json-logger==0.1.11
pytz==2020.1
PyVirtualDisplay==3.0
PyWavelets==1.1.1
PyYAML==5.3.1
pyzmq==19.0.0
requests==2.23.0
requests-oauthlib==1.3.0
rsa==4.0
ruamel-yaml==0.15.80
ruamel.yaml.clib==0.2.0
scikit-image==0.16.2
scikit-learn==0.22.2.post1
scipy==1.4.1
seaborn==0.10.1
Send2Trash==1.5.0
six==1.14.0
sortedcontainers==2.1.0
soupsieve==1.9.4
SQLAlchemy==1.3.16
statsmodels==0.11.1
sympy==1.5.1
tables==3.6.1
tabulate==0.8.10
tblib==1.6.0
tensorboard==2.1.1
tensorflow==2.1.0
tensorflow-estimator==2.1.0
termcolor==1.1.0
terminado==0.8.3
testpath==0.4.4
toolz==0.10.0
tornado==6.0.4
tqdm==4.45.0
traitlets==4.3.3
typing-extensions @ file:///home/conda/feedstock_root/build_artifacts/typing_extensions_1588470653596/work
urllib3==1.25.9
vincent==0.4.4
wcwidth==0.1.9
webencodings==0.5.1
Werkzeug==1.0.1
widgetsnbextension==3.5.1
wrapt==1.12.1
xlrd==1.2.0
zict==2.0.0
zipp==3.1.0
TMosh
February 12, 2024, 8:46pm
4
Some things to be aware of:
The “gym” package is no longer supported. It’s been superseded (in a backward-compatible manner) by “gymnasium”.
You should be able to do this:
!pip import gymnasium
import gymnasium as gym
… and be ready to go.
I was able to complete the Lunar Lander exercise in the Coursera Jupyter notebook. Now I’m trying to run the Lunar Lander on my personal Ubuntu machine and it’s not working. The code is the same so I guess the difference must be in the set-up of the Ubuntu machines and the versions of the packages.
Error I get : next_state, reward, done, _ = env.step(action)
ValueError: too many values to unpack (expected 4)
There is a 5th value. I was able to solve this with
obs, reward, terminated, truncated , info = env.step(action)
But then you have to recode done = truncated or terminated.
Now I’m reworking display_table from the utils.py library. The lambda function is not working correctly, it seems because of the changed env.step output.
TMosh
February 13, 2024, 9:19am
6
To avoid having to re-write parts of the code, you have to be extremely careful that you exactly duplicate the environment that Coursera Labs provides.
That is the problem indeed. I will try creating a new venv and install the requirements with pip from the output you shared.