2016-07-29 14 views
0

私はPythonを初めて使用しています。だから、もしこれがばかげているのであれば申し訳ありませんが、私はフォーラムで理解できる解決策を見つけることができませんでした。 Pycharmでプログラムを実行しようとしていて、最近Python 3.5からPython 2.7.12に変更しました。私はScikit-学ぶからインポート中に以下のエラーが出始めているそう後: - 2016.1、マックOS、Pythonの2.7.12Scikitでのランタイムエラーインポート中の学習

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sklearn/__check_build/__init__.py", line 46, in <module> 
    raise_build_error(e) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sklearn/__check_build/__init__.py", line 41, in raise_build_error 
    %s""" % (e, local_dir, ''.join(dir_content).strip(), msg)) 
ImportError: dynamic module does not define init function (init_check_build) 
___________________________________________________________________________ 
Contents of /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sklearn/__check_build: 
__init__.py    __init__.pyc    _check_build.so 
setup.py     setup.pyc 
___________________________________________________________________________ 
It seems that scikit-learn has not been built correctly. 

If you have installed scikit-learn from source, please do not forget 
to build the package before using it: run `python setup.py install` or 
`make` in the source directory. 

If you have used an installer, please check that it is suited for your 
Python version, your operating system and your platform. 

Process finished with exit code 1 

私はPycharm IDEを使用しています。私はこれをどのように回避するのか教えてください。それでもエラーメッセージごとに、lib/python2.7/site-packages/が不足しているように見えます

おかげ

答えて

1

。 Anaconda for Python 3を使用するようにインタープリタを設定する必要があります。Anacondaを正しくインストールした場合は、Settings - > NameOfYourProject - > Project Interpreterに移動することができます。インタプリタを変更して、Anaconda 3.xスタックを指すようにします。

また、Anaconda 3.x(Pythonだけでなく)をダウンロードしてインストールしてください。 Anaconda 3にはPython 3インタプリタが付属しているので、最新のバージョンをインストールするだけで、Pycharmドロップダウンメニューでそれを見つけることができます。

+0

はい私はすべてを試しましたが、Python 3にはscipyがあり、Python 2.7で実装されたライブラリとして実装されたプロジェクトを使用しているため、問題が発生してランタイムエラーが発生しています。だから私はPython 2.7でCanopy IDEに切り替えました。 –

+0

とにかく助けてくれてありがとう。 –

関連する問題