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

Check your Installation error #41

Open
karthikraja95 opened this issue Nov 17, 2018 · 5 comments
Open

Check your Installation error #41

karthikraja95 opened this issue Nov 17, 2018 · 5 comments

Comments

@karthikraja95
Copy link

I am getting this error. my python version is 3.6.6.
As mentioned in the installation error #13
I downloaded the python 3.7 version and downgraded using conda install python=3.6

capture

Originally posted by @karthikraja95 in #13 (comment)

@jachiam
Copy link
Contributor

jachiam commented Nov 17, 2018

Was there any additional traceback information above that traceback? The error from run_entrypoint.py?

@karthikraja95
Copy link
Author

karthikraja95 commented Nov 17, 2018

I ran the command below, the full traceback information is below.

(spinningup) karthik@karthik-VirtualBox:~/spinningup$ python -m spinup.run ppo --hid "[32,32]" --env LunarLander-v2 --exp_name installtest --gamma 0.999_

ExperimentGrid [installtest] runs over parameters:

gamma [gam]

0.999

env_name [env]

LunarLander-v2

ac_kwargs:hidden_sizes [ac-hid]

[32, 32]

Variants, counting seeds: 1
Variants, not counting seeds: 1

================================================================================

Preparing to run the following experiments...

installtest

================================================================================

Launch delayed to give you a few seconds to review your experiments.

To customize or disable this behavior, change WAIT_BEFORE_LAUNCH in
spinup/user_config.py.

================================================================================
Running experiment:

installtest

with kwargs:

{
"ac_kwargs": {
"hidden_sizes": [
32,
32
]
},
"env_name": "LunarLander-v2",
"gamma": 0.999,
"seed": 0
}

Traceback (most recent call last):
File "/home/karthik/spinningup/spinup/utils/run_entrypoint.py", line 11, in
thunk = pickle.loads(zlib.decompress(base64.b64decode(args.encoded_thunk)))
ModuleNotFoundError: No module named 'spinup'

================================================================================

There appears to have been an error in your experiment.

Check the traceback above to see what actually went wrong. The
traceback below, included for completeness (but probably not useful
for diagnosing the error), shows the stack leading up to the
experiment launch.

================================================================================

Traceback (most recent call last):
File "/home/karthik/anaconda3/envs/spinningup/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/karthik/anaconda3/envs/spinningup/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/karthik/spinningup/spinup/run.py", line 230, in
parse_and_execute_grid_search(cmd, args)
File "/home/karthik/spinningup/spinup/run.py", line 162, in parse_and_execute_grid_search
eg.run(algo, **run_kwargs)
File "/home/karthik/spinningup/spinup/utils/run_utils.py", line 546, in run
data_dir=data_dir, datestamp=datestamp, **var)
File "/home/karthik/spinningup/spinup/utils/run_utils.py", line 171, in call_experiment
subprocess.check_call(cmd, env=os.environ)
File "/home/karthik/anaconda3/envs/spinningup/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python', '/home/karthik/spinningup/spinup/utils/run_entrypoint.py', 'eJyNU89r1EAUnmy2bdraVaxULB4KIqyIu6UgeKj1sKCHlB6qVxmmmdlkzGQSMzPVCoJQ293C4KXPXvyfvPtXePTqy25tiyCYIcmb78378r0f+dT+ehaSyeVvJ6p0vJJJrkTvig2+Q4dSKTp0OrGy1HAK3Yz467RguaAmF1MXwogu0T0nlZWa2oNKIOajQcnFq2ZzBLvQjclkhfHy4DkPxq18tl7nLU4UOcEdD+6QEzIio2DY4iFvf44Qm9kkjecpscE4PAwCMm4PEfmCFicvCXR3fCT0PtWsEBCTbP7PR1r4kYVx8IaMyWGAB3eOwLcb1Sjlgd/oZ2Uh+jmrbSbzvqmk1lKnrpqY+HJWKtOvnaYTq1cdYDabihV7nG1B/G1AIFv0YXpQwDE8sJidf5wwrJR4X4laFkLb3qYqETJbPZs5ndNKOXOJXXD52Ub/UIOFbNlHRSXpsKzzhja74RcuYyE+G3RIKwqadTOYDaMQg/N3rE4N+DntCppUDvzMJARGKDBbPoZGWxz6lWlivWk6F4nhsV34CF0/l6pyD5XhJlv963SjyZYlOrPVUzA+4mLInLIGdnyby8RikO/g3BhXC7rPlBMGXkO34Z1JWVEwePHs56/vP1ZGD7FqnW2nWb3NNBf1o/0N8PMsoed5ING1THIuNDXyw5QmXovXhPFtIwTHHvslVaapqC9Dun6hdLZylnJZg3/yz+ZyZllfamOxU1YYe9WmZh1bjO2bzpJfvOID5+LA3zovClNpiRNRlc0NPmyepyD8bFFyhz9Ndt+3JxzZXR/yMsEqRW8dU1Pee/8xJuDsbu83AWdVyw==']' returned non-zero exit status 1.
(spinningup) karthik@karthik-VirtualBox:~/spinningup$

@jachiam
Copy link
Contributor

jachiam commented Nov 17, 2018

It looks like what's happening is that you have more than one version of Python installed, and it's using the right version of Python when you launch python -m spinup.run, but it's using the wrong version of Python when it subprocess calls run_entrypoint.py. Can you try the solution recommendeded here?

@kevin5k
Copy link

kevin5k commented Jan 14, 2019

I encountered the same issue as mentioned by karthikraja95 on miniconda 3.6.7 (Ubuntu 16.04). I perform the following steps to resolve the error message and missing packages, which failed during earlier pip install process:

  1. Install tensorflow-gpu (missing in the installation instruction in SpinUp website)
  2. conda install -c anaconda psutil
  3. conda install -c conda-forge tqdm
  4. sudo apt-get install python-opengl (unsure if this is really necessary)
  5. pip install -e .

The test installation script successfully completed and I was also able to playback the video. For reproducibility purposes, I have uploaded a copy of my environment for your reference
openaispinup.txt

@LugoBlogger
Copy link

I do not know whether my answer is still useful or not.

I also have the same issue as yours @karthikraja95. I have followed strictly the python version and all packages versions in the Spinning Up documentation. I agree with the author's reply (@jachiam) that it might be a conflict between two versions of python. In my case I have two different python (3.8 and 3.6). Python 3.8 is in the base environment and Python 3.6 is in the spinningup environment. Unfortunately, even though I set the environment to spinningup environment, the python command always call python3.8. To use specifically Python 3.6, we can add suffix 3.6 to the python command in the terminal:

python3.6 -m spinup.run ppo --hid "[32,32]" --env LunarLander-v2 --exp_name installtest --gamma 0.999

And then it works perfectly like a magic.
My operating system is Ubuntu 20.04 LTS.

Another way to resolve it by create an alias of python to python3.6, but I found this solution is not convenient in my opinion.

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

4 participants