0
我想在Pycharm社區版本4.5中設置theano。我正在研究Ubuntu 12.04。 我有兩個問題,在pycharm中導入Numpy和cv2錯誤
1) import numpy gives error, although when i check project interpreter i see numpy installed.
2) import cv2; (this is underlined with red line).
pycharm控制檯上的錯誤givn如下:
Traceback (most recent call last):
File "/afs/cs.stanford.edu/u/ihsan/Documents/pycharm-community-4.5/helpers /pydev/pydevd.py", line 2357, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "/afs/cs.stanford.edu/u/ihsan/Documents/pycharm-community-4.5/helpers/pydev/pydevd.py", line 1777, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/scr/Ihsan/22-april-code/my_convolutional_mlp_2.py", line 29, in <module>
import numpy
File "/afs/cs.stanford.edu/u/ihsan/Documents/pycharm-community-4.5/helpers/pydev/pydev_monkey_qt.py", line 71, in patched_import
return original_import(name, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/numpy/__init__.py", line 170, in <module>
from . import add_newdocs
File "/afs/cs.stanford.edu/u/ihsan/Documents/pycharm-community-4.5/helpers/pydev/pydev_monkey_qt.py", line 71, in patched_import
return original_import(name, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/afs/cs.stanford.edu/u/ihsan/Documents/pycharm-community-4.5/helpers/pydev/pydev_monkey_qt.py", line 71, in patched_import
return original_import(name, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/numpy/lib/__init__.py", line 17, in <module>
from . import scimath as emath
ImportError: cannot import name scimath
Process finished with exit code 1
但我的第一個問題是numpy的,它與進口numpy的停止並不會走得更遠。 任何線索如何解決它?
你需要安裝'scipy'它看起來像:'ImportError:無法導入名稱scimath' – KronoS
我建議安裝Python(x,y)或我個人最喜歡的Anaconda之類的東西。這些幫助您正確管理安裝。 – KronoS
你有多個python安裝或任何虛擬環境? – wflynny