我是数据科学和python的新手。我试图使用scikitplot绘制我在Spyder(Python 3.6)中构建的模型的累积增益曲线。但是,它一直返回错误:ModuleNotFoundError:没有名为'scikitplot'的模块。
见下文:
import scikitplot as skplt
Traceback (most recent call last):
File "<ipython-input-17-1b8f6cd7465e>", line 1, in <module>
import scikitplot as skplt
ModuleNotFoundError: No module named 'scikitplot'
我尝试在anaconda提示符上使用以下内容:
pip install -U scikit-learn scipy matplotlib
和
pip3 install -U scikit-learn scipy matplotlib
但是,这些都没有奏效。结果anaconda提示:
(base) C:\Users\johndoe>pip install -U scikit-learn scipy matplotlib
Collecting scikit-learn
Downloadinghttps://files.pythonhosted.org/packages/8f/1c/9c1d550068f015685d0fccb1726ace7163bbfe5b1a16bda1dcd28d99cb65/scikit_learn-0.20.0-cp36-cp36m-win_amd64.whl (4.7MB)
100% |████████████████████████████████| 4.8MB 2.7MB/s
Requirement already up-to-date: scipy in c:\programdata\anaconda3\lib\site-
packages (1.1.0)
Collecting matplotlib
Downloadinghttps://files.pythonhosted.org/packages/b1/56/569c83515c10146fd0aa09e086816b12e301d0811048e3354a6e9b77ba9a/matplotlib-3.0.2-cp36-cp36m-win_amd64.whl (8.9MB)
100% |████████████████████████████████| 8.9MB 3.0MB/s
Requirement not upgraded as not directly required: numpy>=1.8.2 in
c:\programdata\anaconda3\lib\site-packages (from scikit-learn) (1.14.3)
Requirement not upgraded as not directly required:
pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in
c:\programdata\anaconda3\lib\site-packages (from matplotlib) (2.2.0)
Requirement not upgraded as not directly required: python-dateutil>=2.1 in
c:\programdata\anaconda3\lib\site-packages (from matplotlib) (2.7.3)
Requirement not upgraded as not directly required: cycler>=0.10 in
c:\programdata\anaconda3\lib\site-packages (from matplotlib) (0.10.0)
Requirement not upgraded as not directly required: kiwisolver>=1.0.1 in
c:\programdata\anaconda3\lib\site-packages (from matplotlib) (1.0.1)
Requirement not upgraded as not directly required: six>=1.5 in
c:\programdata\anaconda3\lib\site-packages (from python-dateutil>=2.1-
>matplotlib) (1.11.0)
Requirement not upgraded as not directly required: setuptools in
c:\programdata\anaconda3\lib\site-packages (from kiwisolver>=1.0.1-
>matplotlib)
(39.1.0)
distributed 1.21.8 requires msgpack, which is not installed.
Installing collected packages: scikit-learn, matplotlib
Found existing installation: scikit-learn 0.19.1
Uninstalling scikit-learn-0.19.1:
Could not install packages due to an EnvironmentError: [WinError 5] Access
is denied: 'c:\\programdata\\anaconda3\\lib\\site-packages\\scikit_learn-
0.19.1-py3.6.egg-info\\dependency_links.txt'
Consider using the `--user` option or check the permissions.
感谢任何可能知道我做错了什么的人。
你安装了Matplotlib吗? Scikit-plot取决于Scikit-learn和Matplotlib