Issue installing on ubuntu 16.04 - ImportError: cannot import name Deferred


#1

Hello, attempting to install universe on ubuntu 16.04, not having much luck searching for a resolution to the following error - wondering if anyone on this forum has advise ?

~$ python -c "import gym; import universe"
Traceback (most recent call last):
File “”, line 1, in
File “/home/dan/universe/universe/init.py”, line 22, in
from universe import error, envs
File “/home/dan/universe/universe/envs/init.py”, line 1, in
import universe.envs.vnc_env
File “/home/dan/universe/universe/envs/vnc_env.py”, line 9, in
from universe import error, pyprofile, rewarder, spaces, twisty, vectorized, vncdriver
File “/home/dan/universe/universe/rewarder/init.py”, line 1, in
from universe.rewarder.rewarder_session import RewarderSession
File “/home/dan/universe/universe/rewarder/rewarder_session.py”, line 1, in
from autobahn.twisted import websocket
File “/usr/local/lib/python2.7/dist-packages/autobahn/twisted/init.py”, line 40, in
from autobahn.twisted.util import sleep
File “/usr/local/lib/python2.7/dist-packages/autobahn/twisted/util.py”, line 31, in
from twisted.internet.defer import Deferred
ImportError: cannot import name Deferred


#2

You may a lot harder of a time using python 2 for things than python 3. If you are using python 2, I suspect that if you remove your gym and universe libraries for python 2 and pip3 everything instead, a lot of problems will go away