在python发行版之外使用python库

2024-10-02 08:25:14 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经通过Anaconda发行版安装了python2.7。现在我想使用Anaconda以外的一些包含的库。使用sklearn可以在Anaconda提示符下正常工作。但是,在运行时

import sklearn

从Rhino中的.py脚本中,我得到以下错误:

Message: No module named _check_build
___________________________________________________________________________
Contents of C:\Users\tsawen\AppData\Local\Continuum\Anaconda2\Lib\site-packages\sklearn\__check_build:
setup.py                  setup.pyc                 _check_build.pyd
__init__.py               __init__.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.

Traceback:
  line 31, in raise_build_error, "C:\Users\tsawen\AppData\Local\Continuum\Anaconda2\Lib\site-packages\sklearn\__check_build\__init__.py"
  line 46, in <module>, "C:\Users\tsawen\AppData\Local\Continuum\Anaconda2\Lib\site-packages\sklearn\__check_build\__init__.py"
  line 56, in <module>, "C:\Users\tsawen\AppData\Local\Continuum\Anaconda2\Lib\site-packages\sklearn\__init__.py"
  line 1, in <module>, "C:\Users\tsawen\AppData\Local\Temp\TempScript.py"

前面的一些讨论指出安装有问题。然而,由于在Anaconda中导入sklearn可以正常工作,Python似乎已经正确安装。你知道吗

有人能帮忙使用发行版以外的软件包吗?你知道吗


Tags: inpybuildinitliblocalcheckanaconda

热门问题