openai / neural-mmo

Code for the paper "Neural MMO: A Massively Multiagent Game Environment for Training and Evaluating Intelligent Agents"
https://openai.com/blog/neural-mmo/
MIT License
1.58k stars 261 forks source link

ImportError: cannot import name 'imread' from 'scipy.misc' #10

Closed rmrfslashbin closed 5 years ago

rmrfslashbin commented 5 years ago

When running this step: ]$ python setup.py Traceback (most recent call last): File "setup.py", line 6, in import terrain File "/home/rsigler/src/neural-mmo/neural-mmo/terrain.py", line 7, in from scipy.misc import imread, imsave ImportError: cannot import name 'imread' from 'scipy.misc' (/usr/local/anaconda2/envs/python3/lib/python3.7/site-packages/scipy/misc/init.py)

]$ ipython Python 3.7.2 (default, Dec 29 2018, 06:19:36) Type 'copyright', 'credits' or 'license' for more information IPython 7.2.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import scipy.misc

In [2]: dir(scipy.misc)
Out[2]: ['all', 'builtins', 'cached', 'doc', 'file', 'loader', 'name', 'package', 'path', 'spec', '_comb', '_fact', '_fact2', '_factk', '_info', '_lsm', '_msg', '_pade', '_source', '_who', 'absolute_import', 'ascent', 'central_diff_weights', 'comb', 'derivative', 'division', 'doccer', 'electrocardiogram', 'face', 'factorial', 'factorial2', 'factorialk', 'info', 'logsumexp', 'np', 'pade', 'print_function', 'source', 'test', 'who']

In [3]:

jsuarez5341 commented 5 years ago

Odd -- probably some version issue. Can you provide any additional information on your setup?

shyamsn97 commented 5 years ago

@rmrfslashbin you need to install Pillow, check this out for reference: https://stackoverflow.com/questions/48923151/importing-image-to-python-cannot-import-name-imread?noredirect=1&lq=1

jsuarez5341 commented 5 years ago

@shyamsn97 Thank you. I thought conda should take care of this -- feel free to let me know and reopen if I missed a dependency in the setup file.

tama14142356 commented 4 years ago

@rmrfslashbin I also faced the same problem. However, I resolved. I also think that is version issues. So, I resolved by installing scipy version 1.2.0. pip install scipy==1.2

JinQiangWang2021 commented 3 years ago

@rmrfslashbin I also faced the same problem. However, I resolved. I also think that is version issues. So, I resolved by installing scipy version 1.2.0. pip install scipy==1.2

Thanks, I have solved this question by above method(my enviroment is anaconda+python3.6) Notice: python3.8 is not support to install scipy1.2.1