Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Scenic requires Python>3.8 but that causes issue with CARLA (requires v3.7) #24

Closed
AntiLibrary5 opened this issue Feb 23, 2021 · 2 comments

Comments

@AntiLibrary5
Copy link

CARLA version == 0.9.11
Python version == 3.8.8

Hi, I have been trying to use the scenic API for CARLA. But having followed the instructions at:
https://scenic-lang.readthedocs.io/en/latest/simulators.html#simulators
I run into error which of python version conflict.

Previously I have tried using Python 3.8 for CARLA but it didn't work, but worked only with v3.7. But now scenic's hard dependence on v3.8 seems problematic. Is there a workaround to this problem?

I have been using CARLA with a conda venv with Python 3.7 and it works fine.
For scenic, I created a new venev with Python 3.8 and

pip install scenic
easy_install /PATH_TO_CARLA_FOLDER/PythonAPI/carla/dist/carla-0.9.11-py3.7-win-amd64.egg

Upon running: >> scenic [file-name]
I get the following error:

import carla as carla
File "c:\users\vaibh\anaconda3\envs\venv_scenic\lib\site-packages\carla-0.9.11-py3.7-win-amd64.egg\carla_init
.py", line 8, in
from .libcarla import *
File "c:\users\vaibh\anaconda3\envs\venv_scenic\lib\site-packages\carla-0.9.11-py3.7-win-amd64.egg\carla\libcarla.py", line 7, in
bootstrap()
File "c:\users\vaibh\anaconda3\envs\venv_scenic\lib\site-packages\carla-0.9.11-py3.7-win-amd64.egg\carla\libcarla.py", line 6, in bootstrap
imp.load_dynamic(name,file)
File "c:\users\vaibh\anaconda3\envs\venv_scenic\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: Module use of python37.dll conflicts with this version of Python.

@oslundstrom
Copy link

You can solve this by compiling Carlas PythonAPI for 3.8.

@AntiLibrary5
Copy link
Author

AntiLibrary5 commented Feb 26, 2021

Hi,
Thank you for your response. The problem is building carla from source is non-trivial (mainly because of the storage requirement of ~165gb) and the packaged installation doesn't come with an egg for Python 3.8 yet. But I found the egg file for Python 3.8 and I was able to run Scenic.

For anyone running into similar issue of using the packaged installation of CARLA 0.9.11 that comes with the egg file for Python 3.7 and scenic (which needs 3.8), download the egg file from:
carla-simulator/carla#3917 (comment)

and then in your venv:

easy_install [CARLA-path]/PythonAPI/carla/dist/carla-0.9.11-py3.8-win-amd64.egg
scenic Scenic-master\examples\carla\Carla_Challenge\carlaChallenge1.scenic --simulate --model scenic.simulators.carla.model

shumbo pushed a commit to shumbo/Scenic that referenced this issue Mar 23, 2023
…er-py38-backport

Parser Python 3.8 Backport
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants