dund0200
dund0200

Reputation: 3

Plotting Cumulative Gains Curve in Python (ModuleNotFoundError: No module named 'scikitplot')

I am quite new to data science and python. I am trying to plot the cumulative gains curve of a model I have built in Spyder (Python 3.6) using scikitplot. However, it keeps returning the error: ModuleNotFoundError: No module named 'scikitplot'.

See below:

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'

I have tried using the following on anaconda prompt:

pip install -U scikit-learn scipy matplotlib

and

pip3 install -U scikit-learn scipy matplotlib

However, neither of these have worked. Results in anaconda prompt:

(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.

Thanks to anyone who may know what I'm doing wrong.

Upvotes: -1

Views: 3005

Answers (2)

Brun
Brun

Reputation: 9

use this command:

pip install --trusted-host=pypi.org --trusted-host=files.pythonhosted.org --user Scikit-plot

Upvotes: 1

gocen
gocen

Reputation: 103

Did you install Matplotlib. Scikit-plot depends on Scikit-learn and Matplotlib

Upvotes: 0

Related Questions