pythonimportanacondasumo

Importing traci gives "package not found" error


I am running a simulation code written in python and simulator is sumo. I am using anaconda in ubuntu 20.04. To run a program I need to import traci and I am trying to install but it shows that package not found.

I have created new environment and tried "conda install -c conda-forge traci". But it shows error like this: Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

Current channels:

To search for alternate channels that may provide the conda package you're looking for, navigate to


Solution

  • While there is no conda package of traci, you can still use pip install traci even in an anaconda environment. Please beware of the caveats mentioned here: https://stackoverflow.com/a/45361152/5731587