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

ImportError: No module named traci #305

Closed
CYBruce opened this issue Dec 11, 2018 · 12 comments
Closed

ImportError: No module named traci #305

CYBruce opened this issue Dec 11, 2018 · 12 comments

Comments

@CYBruce
Copy link
Contributor

CYBruce commented Dec 11, 2018

Sorry for the problem again, I solved the problem yesterday and made sugiyama.py run correctly.
However, when I rerun the sugiyama.py today, I got another problem saying "No module named traci". I'm sure I activate the source flow. Also I find the 'traci' direptory locally.
2018-12-11 2 24 58

@CYBruce
Copy link
Contributor Author

CYBruce commented Dec 11, 2018

I solved this problem successfully by appending this path into sys.path, you can close this problem.

@eugenevinitsky
Copy link
Member

eugenevinitsky commented Dec 11, 2018

Glad you solved it!
Just to check, did you install via conda and the setup instructions i.e. did you run python setup.py develop with your conda env activated? Traci should automatically have been added to your conda environment.

@CYBruce
Copy link
Contributor Author

CYBruce commented Dec 12, 2018

@eugenevinitsky I followed the instructions and succeed. But today when I learning tutorial2, I met an error in the last step (the previous steps work well). Do you have some advice?
2018-12-12 9 19 57

@eugenevinitsky
Copy link
Member

Oh yeah; so, I'm still not sure if you're successfully creating a conda env. However, this can be resolved by pip install gym==0.10.5

@eugenevinitsky
Copy link
Member

Any error like this can be solved by running pip install = where you should take version from the environment.yml file.

@CYBruce
Copy link
Contributor Author

CYBruce commented Dec 12, 2018

I got it!

@CYBruce
Copy link
Contributor Author

CYBruce commented Dec 12, 2018

@eugenevinitsky As you said, I run python setup.py develop with flow env activated. But I got sumotools-0.1.0-py3-none-any.whl is not a supported wheel on this platform. And I think this is the key reason for No module named traci

@eugenevinitsky
Copy link
Member

Yeah; we use that wheel to install traci. Very odd. @AboudyKreidieh any thoughts why this error might be occurring?

@CYBruce
Copy link
Contributor Author

CYBruce commented Dec 13, 2018

@AboudyKreidieh PTAL🙌🙌😁

@AboudyKreidieh
Copy link
Member

@CYBruce sorry I missed this! Are you using python2 when you try to install this? It'll only work on python3 unfortunately (as will the rest of our code as well). Let me know if that's the issue and I'll be sure to respond ASAP! :)

@CYBruce
Copy link
Contributor Author

CYBruce commented Dec 16, 2018

Thank you so much!!!
It's my mistake using python2 and I have fixed this.

@AboudyKreidieh
Copy link
Member

Awesome, glad it worked out. Let me know if you run into any other bugs.

@CYBruce CYBruce closed this as completed Dec 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants