Comments (10)
Hi @savasturk,
I think I have run into this issue before; at least in my case, it was an environment setup issue.
First, make sure you have installed the SCRIMMAGE python bindings: https://github.com/gtri/scrimmage/#install-scrimmage-python-bindings
Then, assuming the root directory of the scrimmage repo on your machine is ~/scrimmage/scrimmage
, run the following in your terminal to add the relevant SCRIMMAGE directories to your PYTHONPATH:
export PYTHONPATH=${HOME}/scrimmage/scrimmage/scripts:${HOME}/scrimmage/scrimmage/python:${PYTHONPATH}
Then try to run scrimmage_runner.sh
or whatever script that calls generate_scenarios.py
in that same terminal. If that works, you may want to add that export line to your ~/.bashrc
file, or put it in the script that calls generate_scenarios.py
before generate_scenarios.py
is called.
@esquires and @SyllogismRXS, if there is a cleaner way to make sure Python finds these directories, feel free to chime in. This seems to work for my environment, at least. I hope it helps, @savasturk!
from scrimmage.
Thanks, I applied all of them but I am receiving error like this:
Traceback (most recent call last):
File "generate_scenarios.py", line 47, in
import scrimmage.utils as utils
File "/home/pinar/scrimmage/scrimmage/python/scrimmage/init.py", line 33, in
from scrimmage.utils import *
File "/home/pinar/scrimmage/scrimmage/python/scrimmage/utils.py", line 44, in
import google.protobuf.internal.decoder
ModuleNotFoundError: No module named 'google'
Failed to generate scenarios
then run "sudo pip install conda" and "pip install google " but couldn't solve this error.
from scrimmage.
can you post the output of
pip --version
python --version
My guess is that the pip function is installing for python3 but generate_scenarios is running python2
from scrimmage.
Output like:
pip 10.0.1
Python 3.6.3
you are right,how can I solve this probem?
Thanks a lot .
from scrimmage.
My guess is that you just need to specify pip3. To make really sure everything is the right version though, try removing your build directory and executing the following
rm CMakeCache.txt
cmake .. -DPYTHON_MIN_VERSION=3.0
make
sudo pip3 install protobuf==3.3.0 grpcio==1.2.1 #note the 3
cd /path/to/scrimmage/python
sudo pip3 install -e . # note the 3
from scrimmage.
I tried them but when run ":~/scrimmage/scrimmage/scripts$ ./scrimmage_runner.sh -t 100 -m ../missions/straight-vs-motorschemas.xml -p 7 " in this directory, Ireceived same error. These solutions couldn't solve my error.
from scrimmage.
Perhaps if we simplify the setup we can identify the issue. Let's ignore generate_scenarios.py and scrimmage-runner.sh for a moment. Does this work?
$ python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import google.protobuf.internal.decoder
from scrimmage.
Yes @esquires it was work.
Output like this:
~/scrimmage/scrimmage/scripts$ python3
Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 13 2017, 12:02:49)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import google.protobuf.internal.decoder
from scrimmage.
Can you post the following?
which python
In build/CMakeCache.txt, the line
PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2.7
from scrimmage.
I am going to go ahead and close this. If this is still an issue feel free to re-open and we'll help to resolve your issue.
from scrimmage.
Related Issues (20)
- Update PyYAML version for CVE-2020-14343 HOT 1
- Update Python Sphinx for CVE-2020-11023
- Update CI due to Travis CI Pricing Model Changes
- Controller step function provides incorrect parameters with motion multiplier HOT 3
- Python "pkg-resources" moved to "setuptools"; remove line from python/requirements-*.txt HOT 1
- scripts/generate-plugins.sh uses GTRI (c) instead of a generic template
- A problem about OpenAI! HOT 1
- How to display the simulation in my host while I run the docker image named "syllogismrxs/scrimmage:latest" HOT 2
- Agents exhibit very poor behavior in capture-the-flag.xml mission HOT 1
- Initial setup Issue (cmake .. / cmake generate step) HOT 6
- Custom Built Binary Dependencies
- Add <output_dir_trailer/> tag to mission file / parse
- Frames.bin loses last few frames occasionally
- Looking for scrimmage/proto/Frame.pb.h and ../../Shape.pb.h HOT 1
- csv writer doesn't have enough float precision for lat/lons
- Update plot_3d_fr.py
- python scrimmage/proto_utils add stream input capability
- I'm having issues with $make when building SCRIMMAGE HOT 4
- Enable concatenation of mission files HOT 4
- error while running a scrimmage mission
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scrimmage.