question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Have you considered using environment.yml or requirements.txt?

See original GitHub issue

Did it ever cross your mind to use an enivronment.yml or at least a requirements.txt file? Or is it a local custom in your country not to include versions of each specific Python library / framework? 😜

I understand that you’re using the setup.py file to install it from source; however, you did not include all the specific versions at line 3.

Suggestion

Including all versions could have been useful. Including a requirements.txt would’ve been more useful. Including an enivronment.yml would’ve been even more useful. Using Docker would have been the ultimate solution. Please don’t expect your users to use trial-and-error to find the version of each specific dependency.

pip freeze is your friend. 😉

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
LucasAlegrecommented, Sep 14, 2022

Anyway, I managed to resolve the dependencies by myself.

Is this a code that your repository is intended to run? It was taken from README.md.

Input

import sumo_rl
env = sumo_rl.env(net_file='sumo_net_file.net.xml', route_file='sumo_route_file.rou.xml', use_gui=True, num_seconds=3600)

Output

 Retrying in 1 seconds
dyld: Library not loaded: /usr/local/opt/proj/lib/libproj.25.dylib
  Referenced from: /usr/local/Cellar/sumo/1.14.1/share/sumo/bin/sumo
  Reason: image not found
/Applications/anaconda3/envs/sumo_rl_pip/lib/python3.7/site-packages/traci/main.py:160: UserWarning: Could not connect to TraCI server using port 60396 (TraCI server already finished). Retrying with different port.
  " Retrying with different port.") % (sumoPort, e))
 Retrying in 1 seconds
dyld: Library not loaded: /usr/local/opt/proj/lib/libproj.25.dylib
  Referenced from: /usr/local/Cellar/sumo/1.14.1/share/sumo/bin/sumo
  Reason: image not found
/Applications/anaconda3/envs/sumo_rl_pip/lib/python3.7/site-packages/traci/main.py:160: UserWarning: Could not connect to TraCI server using port 60399 (TraCI server already finished). Retrying with different port.
  " Retrying with different port.") % (sumoPort, e))
 Retrying in 1 seconds
dyld: Library not loaded: /usr/local/opt/proj/lib/libproj.25.dylib
  Referenced from: /usr/local/Cellar/sumo/1.14.1/share/sumo/bin/sumo
  Reason: image not found
/Applications/anaconda3/envs/sumo_rl_pip/lib/python3.7/site-packages/traci/main.py:160: UserWarning: Could not connect to TraCI server using port 60402 (TraCI server already finished). Retrying with different port.
  " Retrying with different port.") % (sumoPort, e))
 Retrying in 1 seconds
dyld: Library not loaded: /usr/local/opt/proj/lib/libproj.25.dylib
  Referenced from: /usr/local/Cellar/sumo/1.14.1/share/sumo/bin/sumo
  Reason: image not found
/Applications/anaconda3/envs/sumo_rl_pip/lib/python3.7/site-packages/traci/main.py:160: UserWarning: Could not connect to TraCI server using port 60405 (TraCI server already finished). Retrying with different port.
  " Retrying with different port.") % (sumoPort, e))

(… and keeps looping continuously with the same error)

You should replace net_file=‘sumo_net_file.net.xml’, route_file=‘sumo_route_file.rou.xml’ with actual existing files. A few networks and route files are available on nets folder.

1reaction
LucasAlegrecommented, Sep 14, 2022

It’s not clear what you’re trying to say. In any case, do you have any example code that your repository is intended to run? PS. The problem seems to be with your repository and not the “RL algorithms”. You’re missing dependencies.

SUMO-RL is repository that provides Gym and PettingZoo environments. It IS NOT a repository for running RL algorithms. Stable-baselines, RLlib, etc. ARE NOT SUMO-RL dependencies, and should not be installed by default when installing SUMO-RL.

An example of running a Tabular QL agent can be found here: See https://github.com/LucasAlegre/sumo-rl/blob/master/experiments/ql_4x4grid.py

Read more comments on GitHub >

github_iconTop Results From Across the Web

Combining conda environment.yml with pip requirements.txt
from inspecting my env.yml file it seems that conda env export > environment.yml already includes the pip packages I need. That's great! –...
Read more >
conda install: env.yml vs requirements.txt · Issue #6411 - GitHub
Couple of weeks ago I started using environment yml file to install dependencies instead of conda install requrements.txt.
Read more >
Why do people provide a requirements.txt or environment.yml ...
IMO every repo should contain an environment.yml file that builds the conda env needed to run the code in that repo (I'm a...
Read more >
Sharing Environments – Introduction to Conda for (Data ...
YAML is a human-readable data-serialization language that is commonly used for configuration files and that uses Python-style indentation to indicate nesting.
Read more >
How I Manage Python Dependencies in Data Science Projects
Should you go with the default pip and its requirements.txt file, ... use the data science specific Conda and an environment.yml file?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found