2015-05-20 84 views
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的停止並不會走得更遠。 任何線索如何解決它?

+0

你需要安裝'scipy'它看起來像:'ImportError:無法導入名稱scimath' – KronoS

+0

我建議安裝Python(x,y)或我個人最喜歡的Anaconda之類的東西。這些幫助您正確管理安裝。 – KronoS

+0

你有多個python安裝或任何虛擬環境? – wflynny

回答

-1

,我不知道你有多少經驗與Python,很抱歉,如果我的回答是太簡單了,但你有沒有試圖通過在控制檯/終端輸入

pip install scimath 

安裝scimath?

+0

給出錯誤:ImportError:libatlas.so.3gf:無法打開共享對象文件:沒有這樣的文件或目錄 – khan