huawei-noah / SMARTS

Scalable Multi-Agent RL Training School for Autonomous Driving
MIT License
922 stars 186 forks source link

[Help Request] Unable to complete installation according to the document. #2090

Closed l1xiao closed 10 months ago

l1xiao commented 10 months ago

High Level Description

I followed the doc to install SMARTS but failed. There are 2 problems:

  1. $ pip install -e .[camera_obs,sumo,test] should be $ pip install -e '.[camera_obs,sumo,test]'
  2. Fail to execute $ make sanity-test, error info:

(.venv) ➜ SMARTS git:(v1.4.0) make sanity-test scl scenario build --clean scenarios/sumo/loop Building: scenarios/sumo/loop Error processing line 1 of /home/XX/SMARTS/.venv/lib/python3.8/site-packages/editable.smarts-1.4.0.pth:

Fatal Python error: init_import_size: Failed to import the site module Python runtime state: initialized Traceback (most recent call last): File "/usr/local/lib/python3.8/site.py", line 169, in addpackage exec(line) File "", line 1, in File "/home/XX/SMARTS/.venv/lib/python3.8/site-packages/__editable_smarts_1_4_0_finder.py", line 2, in from importlib.machinery import ModuleSpec, PathFinder File "/usr/local/lib/python3.8/importlib/init.py", line 57, in import types File "/home/XX/SMARTS/smarts/sstudio/types/init__.py", line 20, in from smarts.sstudio.types.actor.social_agent_actor import * ModuleNotFoundError: No module named 'smarts'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.8/site.py", line 580, in main() File "/usr/local/lib/python3.8/site.py", line 563, in main known_paths = venv(known_paths) File "/usr/local/lib/python3.8/site.py", line 495, in venv addsitepackages(known_paths, [sys.prefix]) File "/usr/local/lib/python3.8/site.py", line 350, in addsitepackages addsitedir(sitedir, known_paths) File "/usr/local/lib/python3.8/site.py", line 208, in addsitedir addpackage(sitedir, name, known_paths) File "/usr/local/lib/python3.8/site.py", line 179, in addpackage import traceback File "/usr/local/lib/python3.8/traceback.py", line 5, in import linecache File "/usr/local/lib/python3.8/linecache.py", line 11, in import tokenize File "/usr/local/lib/python3.8/tokenize.py", line 32, in import re File "/usr/local/lib/python3.8/re.py", line 124, in import enum File "/usr/local/lib/python3.8/enum.py", line 2, in from types import MappingProxyType, DynamicClassAttribute File "/home/XX/SMARTS/smarts/sstudio/types/init.py", line 20, in from smarts.sstudio.types.actor.social_agent_actor import * ModuleNotFoundError: No module named 'smarts' Command '['/home/XX/SMARTS/.venv/bin/python3.8', 'scenario_builder.py', '/home/XX/SMARTS/scenarios/sumo/loop/scenario.py', '42']' returned non-zero exit status 1. Makefile:87: recipe for target 'build-sanity-scenarios' failed make: *** [build-sanity-scenarios] Error 1

Version

1.4.0

Operating System

ubuntu 18.04

Problems

No response

Gamenot commented 10 months ago

High Level Description

I followed the doc to install SMARTS but failed. There are 2 problems:

  1. $ pip install -e .[camera_obs,sumo,test] should be $ pip install -e '.[camera_obs,sumo,test]'

Yes, that can be updated, I assume you are using a different shell like zsh?

  1. Fail to execute $ make sanity-test, error info:

This seems a bit odd to me. Considering importlib is unable to resolve import smarts I wonder if the package installed correctly. My confusion here is that the entry-point smarts.sstudio.types is being imported as types as if it were an individual package.

l1xiao commented 10 months ago

Thanks for your reply!

I assume you are using a different shell like zsh?

Yes, I use zsh indeed.

--config-settings editable_mode=strict

It works! I can run the example correctly now.