I am trying to install a Python script which does a:
from google_auth_oauthlib.flow import InstalledAppFlow
however the returned error on execution is:
pi#raspberrypi:~ $ /usr/bin/python3 /usr/lib/python3/dist-packages/google/google_calendar_service.py
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/google/google_calendar_service.py", line 3, in <module>
from google_auth_oauthlib.flow import InstalledAppFlow
ModuleNotFoundError: No module named 'google_auth_oauthlib'
I tried inserting "google-auth-oauthlib" as requirement in the distutils setup.py, with or without version, tried also the name of the package "python3-google-auth-oauthlib" but nothing works:
install_requires=['google-api-python-client>=2.3.0',
'google-auth-oauthlib>=0.4.1',
'google-auth>=1.30.0',
'python3-google-auth-oauthlib'],
in the end I tried manually installing it:
sudo pip install google-auth-oauthlib
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting google-auth-oauthlib
Downloading https://files.pythonhosted.org/packages/7b/b8/88def36e74bee9fce511c9519571f4e485e890093ab7442284f4ffaef60b/google_auth_oauthlib-0.4.1-py2.py3-none-any.whl
Collecting google-auth (from google-auth-oauthlib)
Downloading https://files.pythonhosted.org/packages/d2/c1/44179a1cfc5c3b5832a5f9c925161612471ec5f346bcd186235651d74f35/google_auth-1.30.0-py2.py3-none-any.whl (146kB)
100% |████████████████████████████████| 153kB 46kB/s
Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/lib/python2.7/dist-packages (from google-auth-oauthlib) (1.0.0)
Requirement already satisfied: six>=1.9.0 in /usr/lib/python2.7/dist-packages (from google-auth->google-auth-oauthlib) (1.12.0)
Requirement already satisfied: setuptools>=40.3.0 in /usr/lib/python2.7/dist-packages (from google-auth->google-auth-oauthlib) (40.8.0)
Collecting pyasn1-modules>=0.2.1 (from google-auth->google-auth-oauthlib)
Downloading https://files.pythonhosted.org/packages/95/de/214830a981892a3e286c3794f41ae67a4495df1108c3da8a9f62159b9a9d/pyasn1_modules-0.2.8-py2.py3-none-any.whl (155kB)
100% |████████████████████████████████| 163kB 43kB/s
Collecting rsa<4.6; python_version < "3.6" (from google-auth->google-auth-oauthlib)
Downloading https://files.pythonhosted.org/packages/26/f8/8127fdda0294f044121d20aac7785feb810e159098447967a6103dedfb96/rsa-4.5-py2.py3-none-any.whl
Collecting cachetools<5.0,>=2.0.0 (from google-auth->google-auth-oauthlib)
Downloading https://files.pythonhosted.org/packages/2f/a6/30b0a0bef12283e83e58c1d6e7b5aabc7acfc4110df81a4471655d33e704/cachetools-3.1.1-py2.py3-none-any.whl
Collecting pyasn1<0.5.0,>=0.4.6 (from pyasn1-modules>=0.2.1->google-auth->google-auth-oauthlib)
Downloading https://files.pythonhosted.org/packages/62/1e/a94a8d635fa3ce4cfc7f506003548d0a2447ae76fd5ca53932970fe3053f/pyasn1-0.4.8-py2.py3-none-any.whl (77kB)
100% |████████████████████████████████| 81kB 66kB/s
Installing collected packages: pyasn1, pyasn1-modules, rsa, cachetools, google-auth, google-auth-oauthlib
Successfully installed cachetools-3.1.1 google-auth-1.30.0 google-auth-oauthlib-0.4.1 pyasn1-0.4.8 pyasn1-modules-0.2.8 rsa-4.5
still the same error.
Related
I'm trying test example:
from pyscipopt import Model
model = Model("Example") # model name is optional
x = model.addVar("x")
y = model.addVar("y", vtype="INTEGER")
model.setObjective(x + y)
model.addCons(2*x - y*y >= 0)
model.optimize()
sol = model.getBestSol()
print("x: {}".format(sol[x]))
print("y: {}".format(sol[y]))
but got
runfile('C:/Users/man_c/Downloads/ProHeatNet_Sim-master without Gurobi/ProHeatNet_Sim-master/untitled0.py', wdir='C:/Users/man_c/Downloads/ProHeatNet_Sim-master without Gurobi/ProHeatNet_Sim-master')
Traceback (most recent call last):
File "C:\Users\man_c\Downloads\ProHeatNet_Sim-master without Gurobi\ProHeatNet_Sim-master\untitled0.py", line 8, in <module>
from pyscipopt import Model
File "C:\Users\man_c\anaconda3\lib\site-packages\pyscipopt\__init__.py", line 11, in <module>
from pyscipopt.scip import Model
ImportError: DLL load failed while importing scip: No module found.
Have tried everything listed here: https://github.com/scipopt/PySCIPOpt/blob/master/INSTALL.md
C:\WINDOWS\system32>set SCIPOPTDIR=C:\SCIPOptSuite 8.0.1
C:\WINDOWS\system32>python -m pip install pyscipopt
Collecting pyscipopt
Using cached PySCIPOpt-4.2.0.tar.gz (661 kB)
Requirement already satisfied: wheel in c:\users\man_c\anaconda3\lib\site-packages (from pyscipopt) (0.37.0)
Building wheels for collected packages: pyscipopt
Building wheel for pyscipopt (setup.py) ... done
Created wheel for pyscipopt: filename=PySCIPOpt-4.2.0-cp39-cp39-win_amd64.whl size=612019 sha256=a931e29e41d971e957d4ed3397b244ed4c3b6321512870493572c1c7f0a0bdd5
Stored in directory: c:\users\man_c\appdata\local\pip\cache\wheels\15\c8\80\0b7bc0e370527c3241b54ee3949698f0a06c5697eae6b60038
Successfully built pyscipopt
Installing collected packages: pyscipopt
Successfully installed pyscipopt-4.2.0
C:\WINDOWS\system32>pip install pytest
Requirement already satisfied: pytest in c:\users\man_c\anaconda3\lib\site-packages (6.2.4)
Requirement already satisfied: attrs>=19.2.0 in c:\users\man_c\anaconda3\lib\site-packages (from pytest) (21.2.0)
Requirement already satisfied: iniconfig in c:\users\man_c\anaconda3\lib\site-packages (from pytest) (1.1.1)
Requirement already satisfied: packaging in c:\users\man_c\anaconda3\lib\site-packages (from pytest) (21.0)
Requirement already satisfied: pluggy<1.0.0a1,>=0.12 in c:\users\man_c\anaconda3\lib\site-packages (from pytest) (0.13.1)
Requirement already satisfied: py>=1.8.2 in c:\users\man_c\anaconda3\lib\site-packages (from pytest) (1.10.0)
Requirement already satisfied: toml in c:\users\man_c\anaconda3\lib\site-packages (from pytest) (0.10.2)
Requirement already satisfied: atomicwrites>=1.0 in c:\users\man_c\anaconda3\lib\site-packages (from pytest) (1.4.0)
Requirement already satisfied: colorama in c:\users\man_c\anaconda3\lib\site-packages (from pytest) (0.4.4)
Requirement already satisfied: pyparsing>=2.0.2 in c:\users\man_c\anaconda3\lib\site-packages (from packaging->pytest) (3.0.4)
C:\WINDOWS\system32>python -m pip install pyscipopt
Requirement already satisfied: pyscipopt in c:\users\man_c\anaconda3\lib\site-packages (4.2.0)
Requirement already satisfied: wheel in c:\users\man_c\anaconda3\lib\site-packages (from pyscipopt) (0.37.0)
C:\WINDOWS\system32>pip list
Package Version
---------------------------------- --------------------
...
PySCIPOpt 4.2.0
Got the same issue as described here: https://github.com/scipopt/PySCIPOpt/issues/467 by mariaeileen, but no solution available. The only difference is error itself:
ModuleNotFoundError: No module named 'pyscipopt'`
Is that important?
While installing saw this
error
but did this:
set PATH=%PATH%;%SCIPOPTDIR%\bin
Was that enough?
I am trying to install Mito (low code spreadsheet option) into an Anaconda environment. I have managed to create the package and I am running it locally on my machine.
When I try and install it gives me the error in hte last line and I have added all the steps that I followed to get to this point
conda activate mitoenv
[Note: you may need to restart the kernel to use updated packages.]
pip install mitoinstaller
[Requirement already satisfied: mitoinstaller in c:\users\osjmuller\anaconda_latest\envs\mitoenv\lib\site-packages (0.0.107)Note: you may need to restart the kernel to use updated packages.
Requirement already satisfied: colorama in c:\users\osjmuller\anaconda_latest\envs\mitoenv\lib\site-packages (from mitoinstaller) (0.4.4)
Requirement already satisfied: termcolor in c:\users\osjmuller\anaconda_latest\envs\mitoenv\lib\site-packages (from mitoinstaller) (1.1.0)
Requirement already satisfied: analytics-python in c:\users\osjmuller\anaconda_latest\envs\mitoenv\lib\site-packages (from mitoinstaller) (1.4.0)
Requirement already satisfied: python-dateutil>2.1 in c:\users\osjmuller\anaconda_latest\envs\mitoenv\lib\site-packages (from analytics-python->mitoinstaller) (2.8.2)
Requirement already satisfied: monotonic>=1.5 in c:\users\osjmuller\anaconda_latest\envs\mitoenv\lib\site-packages (from analytics-python->mitoinstaller) (1.6)
Requirement already satisfied: requests<3.0,>=2.7 in c:\users\osjmuller\anaconda_latest\envs\mitoenv\lib\site-packages (from analytics-python->mitoinstaller) (2.27.1)
Requirement already satisfied: backoff==1.10.0 in c:\users\osjmuller\anaconda_latest\envs\mitoenv\lib\site-packages (from analytics-python->mitoinstaller) (1.10.0)
Requirement already satisfied: six>=1.5 in c:\users\osjmuller\anaconda_latest\envs\mitoenv\lib\site-packages (from analytics-python->mitoinstaller) (1.16.0)
Requirement already satisfied: charset-normalizer~=2.0.0 in c:\users\osjmuller\anaconda_latest\envs\mitoenv\lib\site-packages (from requests<3.0,>=2.7->analytics-python->mitoinstaller) (2.0.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\osjmuller\anaconda_latest\envs\mitoenv\lib\site-packages (from requests<3.0,>=2.7->analytics-python->mitoinstaller) (1.26.8)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\osjmuller\anaconda_latest\envs\mitoenv\lib\site-packages (from requests<3.0,>=2.7->analytics-python->mitoinstaller) (2021.10.8)
Requirement already satisfied: idna<4,>=2.5 in c:\users\osjmuller\anaconda_latest\envs\mitoenv\lib\site-packages (from requests<3.0,>=2.7->analytics-python->mitoinstaller) (3.3)]
python -m pip install mitoinstaller:
File "C:\Users\OSJMUL~1\AppData\Local\Temp/ipykernel_18156/784919668.py", line 1
python -m pip install mitoinstaller
^
SyntaxError: invalid syntax
I guess you erroneously added : at the end of last command. From the documentation:
conda create -n mitoenv python=3.8
conda activate mitoenv
python -m pip install mitoinstaller
python -m mitoinstaller install
However, I had some errors after python -m pip install mitoinstaller due to missing dependencies:
(mitoenv) luca#ASUS-ROG:~$ pip install mitoinstaller
Collecting mitoinstaller
Using cached mitoinstaller-0.0.122-py3-none-any.whl
Collecting termcolor
Using cached termcolor-1.1.0-py3-none-any.whl
Requirement already satisfied: colorama in ./.local/lib/python3.8/site-packages (from mitoinstaller) (0.4.4)
Collecting analytics-python
Using cached analytics_python-1.4.0-py2.py3-none-any.whl (15 kB)
Collecting requests<3.0,>=2.7
Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting monotonic>=1.5
Using cached monotonic-1.6-py2.py3-none-any.whl (8.2 kB)
Collecting backoff==1.10.0
Using cached backoff-1.10.0-py2.py3-none-any.whl (31 kB)
Collecting six>=1.5
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Requirement already satisfied: python-dateutil>2.1 in ./.local/lib/python3.8/site-packages (from analytics-python->mitoinstaller) (2.8.1)
Collecting charset-normalizer~=2.0.0
Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting idna<4,>=2.5
Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.8-py2.py3-none-any.whl (138 kB)
Installing collected packages: termcolor, monotonic, certifi, urllib3, six, idna, charset-normalizer, backoff, requests, analytics-python, mitoinstaller
ERROR: pips dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
requests-oauthlib 1.3.0 requires oauthlib>=3.0.0, which is not installed.
pandas 1.2.2 requires pytz>=2017.3, which is not installed.
oauth2client 4.1.3 requires httplib2>=0.9.1, which is not installed.
moto 1.3.16.dev122 requires MarkupSafe<2.0, which is not installed.
moto 1.3.16.dev122 requires more-itertools, which is not installed.
moto 1.3.16.dev122 requires pytz, which is not installed.
moto 1.3.16.dev122 requires zipp, which is not installed.
google-api-core 1.26.3 requires packaging>=14.3, which is not installed.
google-api-core 1.26.3 requires pytz, which is not installed.
Successfully installed analytics-python-1.4.0 backoff-1.10.0 certifi-2021.10.8 charset-normalizer-2.0.12 idna-3.3 mitoinstaller-0.0.122 monotonic-1.6 requests-2.27.1 six-1.16.0 termcolor-1.1.0 urllib3-1.26.8
for which I had to first install manually the missing packages:
pip install mitoinstaller
pip install requests-oauthlib
pip install oauth2client
pip install pandas
pip install moto
and finally python -m mitoinstaller install worked.
I installed locust using the command on windows
py -m pip install locustio
This is the output I got
Collecting locustio
Using cached https://files.pythonhosted.org/packages/98/12/60351b28a00c76d36022d79bead7dc217e9e49cddd7091cb164319196323/locustio-0.11.0-py2.py3-none-any.whl
Collecting gevent>=1.2.2 (from locustio)
Downloading https://files.pythonhosted.org/packages/8a/dd/417aad4e69fa7f8882534b778c46cb28eb0421ffa1e924ec3b4efcfcc81f/gevent-1.4.0-cp37-cp37m-win_amd64.whl (3.0MB)
100% |████████████████████████████████| 3.0MB 356kB/s
Requirement already satisfied: requests>=2.9.1 in c:\python37\lib\site-packages (from locustio) (2.22.0)
Collecting six>=1.10.0 (from locustio)
Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting msgpack>=0.4.2 (from locustio)
Downloading https://files.pythonhosted.org/packages/d1/67/476640810609471e0f3a32c9f4388bf1318b773d0a64b116305d3b604dca/msgpack-0.6.1-cp37-cp37m-win_amd64.whl (68kB)
100% |████████████████████████████████| 71kB 354kB/s
Collecting flask>=0.10.1 (from locustio)
Using cached https://files.pythonhosted.org/packages/9b/93/628509b8d5dc749656a9641f4caf13540e2cdec85276964ff8f43bbb1d3b/Flask-1.1.1-py2.py3-none-any.whl
Collecting pyzmq>=16.0.2 (from locustio)
Downloading https://files.pythonhosted.org/packages/62/15/27d1655af3f96c59073073b03022c6a0c1cbfa583c036b46ae8c33d51ee6/pyzmq-18.1.0-cp37-cp37m-win_amd64.whl (1.0MB)
100% |████████████████████████████████| 1.1MB 314kB/s
Collecting cffi>=1.11.5; sys_platform == "win32" and platform_python_implementation == "CPython" (from gevent>=1.2.2->locustio)
Downloading https://files.pythonhosted.org/packages/2f/ad/9722b7752fdd88c858be57b47f41d1049b5fb0ab79caf0ab11407945c1a7/cffi-1.12.3-cp37-cp37m-win_amd64.whl (171kB)
100% |████████████████████████████████| 174kB 108kB/s
Collecting greenlet>=0.4.14; platform_python_implementation == "CPython" (from gevent>=1.2.2->locustio)
Downloading https://files.pythonhosted.org/packages/90/a3/da8593df08ee2efeb86ccf3201508a1fd2a3749e2735b7cadb7dd00416c6/greenlet-0.4.15-cp37-cp37m-win_amd64.whl
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\python37\lib\site-packages (from requests>=2.9.1->locustio) (1.25.3)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\python37\lib\site-packages (from requests>=2.9.1->locustio) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in c:\python37\lib\site-packages (from requests>=2.9.1->locustio) (2019.6.16)
Requirement already satisfied: idna<2.9,>=2.5 in c:\python37\lib\site-packages (from requests>=2.9.1->locustio) (2.8)
Collecting itsdangerous>=0.24 (from flask>=0.10.1->locustio)
Using cached https://files.pythonhosted.org/packages/76/ae/44b03b253d6fade317f32c24d100b3b35c2239807046a4c953c7b89fa49e/itsdangerous-1.1.0-py2.py3-none-any.whl
Collecting Jinja2>=2.10.1 (from flask>=0.10.1->locustio)
Using cached https://files.pythonhosted.org/packages/1d/e7/fd8b501e7a6dfe492a433deb7b9d833d39ca74916fa8bc63dd1a4947a671/Jinja2-2.10.1-py2.py3-none-any.whl
Collecting Werkzeug>=0.15 (from flask>=0.10.1->locustio)
Using cached https://files.pythonhosted.org/packages/d1/ab/d3bed6b92042622d24decc7aadc8877badf18aeca1571045840ad4956d3f/Werkzeug-0.15.5-py2.py3-none-any.whl
Collecting click>=5.1 (from flask>=0.10.1->locustio)
Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.11.5; sys_platform == "win32" and platform_python_implementation == "CPython"->gevent>=1.2.2->locustio)
Using cached https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz
Collecting MarkupSafe>=0.23 (from Jinja2>=2.10.1->flask>=0.10.1->locustio)
Downloading https://files.pythonhosted.org/packages/65/c6/2399700d236d1dd681af8aebff1725558cddfd6e43d7a5184a675f4711f5/MarkupSafe-1.1.1-cp37-cp37m-win_amd64.whl
Installing collected packages: pycparser, cffi, greenlet, gevent, six, msgpack, itsdangerous, MarkupSafe, Jinja2, Werkzeug, click, flask, pyzmq, locustio
Running setup.py install for pycparser ... done
The script flask.exe is installed in 'C:\Python37\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
The script locust.exe is installed in 'C:\Python37\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed Jinja2-2.10.1 MarkupSafe-1.1.1 Werkzeug-0
Now when I run the command locust --help
I get this on the command line
'locust' is not recognized as an internal or external command,
operable program or batch file
What could be the issue?Any help would be appreciated.
It seems that you have not added python 3.7 in the environment variable PATH. While this could have been achieved while installing python itself by checking the box to Add Python to the path. However, you can still add the location of Python37(where python37 is installed) by going to This PC--Right-Click->Properties-->Advanced System Settings-->Environment Variables tab-->System Variables--Edit Path & add value*.
I recently wrote steps for setting up locust on windows which might help -https://www.qamilestone.com/post/set-up-locust-on-windows
-Regards,
Anuradha
I developed a package that uses matplotlib and so I've added the following line to my project's setup.py: (link to setup.py)
install_requires=[
'matplotlib>=2.0.0',
...other libs
]
However, when I tried to install my package into a virtualenv (via pip install) that already had matplolib version 2.1.0 installed, pip fetched and installed matplotlib version 3 regardless.
Is this expected behaviour or was there something else happening here?
Let's me try with a new empty virtualenv:
$ pip install matplotlib==2.1.0
Collecting matplotlib==2.1.0
Downloading https://files.pythonhosted.org/packages/6c/90/cf10bb2020d2811da811a49601f6eafcda022c6ccd296fd05aba093dee96/matplotlib-2.1.0.tar.gz (35.7MB)
100% |################################| 35.7MB 412kB/s
Collecting numpy>=1.7.1 (from matplotlib==2.1.0)
Using cached https://files.pythonhosted.org/packages/45/04/7a738e489a25a9638520a43a0cbfcc4be3ed056266e3110a330a905b36b5/numpy-1.16.2-cp35-cp35m-manylinux1_i686.whl
Collecting six>=1.10 (from matplotlib==2.1.0)
Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting python-dateutil>=2.0 (from matplotlib==2.1.0)
Using cached https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl
Collecting pytz (from matplotlib==2.1.0)
Downloading https://files.pythonhosted.org/packages/3d/73/fe30c2daaaa0713420d0382b16fbb761409f532c56bdcc514bf7b6262bb6/pytz-2019.1-py2.py3-none-any.whl (510kB)
100% |################################| 512kB 8.4MB/s
Collecting cycler>=0.10 (from matplotlib==2.1.0)
Using cached https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 (from matplotlib==2.1.0)
Downloading https://files.pythonhosted.org/packages/dd/d9/3ec19e966301a6e25769976999bd7bbe552016f0d32b577dc9d63d2e0c49/pyparsing-2.4.0-py2.py3-none-any.whl (62kB)
100% |################################| 71kB 10.8MB/s
Building wheels for collected packages: matplotlib
Building wheel for matplotlib (setup.py) ... done
Stored in directory: /home/phd/.cache/pip/wheels/a7/99/eb/b5566219ff5a526f98e802144d551feaa6b9340b3569bf86df
Successfully built matplotlib
Installing collected packages: numpy, six, python-dateutil, pytz, cycler, pyparsing, matplotlib
Successfully installed cycler-0.10.0 matplotlib-2.1.0 numpy-1.16.2 pyparsing-2.4.0 python-dateutil-2.8.0 pytz-2019.1 six-1.12.0
$ pip install dsutil
Collecting dsutil
Downloading https://files.pythonhosted.org/packages/17/58/ea2ccb9d071040eb5baa16b91327a6799decec6cfbfb12222388e37951d7/dsutil-0.1.1-py3-none-any.whl
Collecting scikit-learn>=0.20.0 (from dsutil)
Downloading https://files.pythonhosted.org/packages/ee/40/d5e691b6f103f5cdfbd2e1468cb172f2267224844330ffe494409ff6a3d5/scikit_learn-0.20.3-cp35-cp35m-manylinux1_i686.whl (4.9MB)
100% |################################| 4.9MB 4.3MB/s
Collecting pandas>=0.20.0 (from dsutil)
Downloading https://files.pythonhosted.org/packages/b1/57/069982c126d22bbdb4de71912eec2c1d8d303149a0d7b17927797479a0ed/pandas-0.24.2-cp35-cp35m-manylinux1_i686.whl (8.7MB)
100% |################################| 8.7MB 3.0MB/s
Requirement already satisfied: matplotlib>=2.0.0 in ./lib/python3.5/site-packages (from dsutil) (2.1.0)
Requirement already satisfied: numpy>=1.8.2 in ./lib/python3.5/site-packages (from scikit-learn>=0.20.0->dsutil) (1.16.2)
Collecting scipy>=0.13.3 (from scikit-learn>=0.20.0->dsutil)
Using cached https://files.pythonhosted.org/packages/19/7b/fdd034bbd1c266b05bc5c38bc91e6733c0e19bc9d3630fd32d869998b6e3/scipy-1.2.1-cp35-cp35m-manylinux1_i686.whl
Requirement already satisfied: python-dateutil>=2.5.0 in ./lib/python3.5/site-packages (from pandas>=0.20.0->dsutil) (2.8.0)
Requirement already satisfied: pytz>=2011k in ./lib/python3.5/site-packages (from pandas>=0.20.0->dsutil) (2019.1)
Requirement already satisfied: cycler>=0.10 in ./lib/python3.5/site-packages (from matplotlib>=2.0.0->dsutil) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in ./lib/python3.5/site-packages (from matplotlib>=2.0.0->dsutil) (2.4.0)
Requirement already satisfied: six>=1.10 in ./lib/python3.5/site-packages (from matplotlib>=2.0.0->dsutil) (1.12.0)
Installing collected packages: scipy, scikit-learn, pandas, dsutil
Successfully installed dsutil-0.1.1 pandas-0.24.2 scikit-learn-0.20.3 scipy-1.2.1
See? matplotlib is not upgraded. Requirement already satisfied: matplotlib>=2.0.0. Can you show similar output of your terminal so we better understand what is going on?
Since you are specifying version to be >=2.0.0 (greater than 2.x.x), pip is installing latest version 3.x.x.
If you want to install version 2.0.0 then try using following code:
install_requires=[
'matplotlib==2.0.0'
]
Link for more information about versioning.
While installing Jupyter I was almost done until at last something called exception appeared. I am very new to Ubuntu and Python so can't understand these things.
pip install jupyter
Collecting jupyter
Downloading jupyter-1.0.0-py2.py3-none-any.whl
Collecting nbconvert (from jupyter)
Downloading nbconvert-5.3.1-py2.py3-none-any.whl (387kB)
100% |████████████████████████████████| 389kB 1.3MB/s
Collecting ipywidgets (from jupyter)
Downloading ipywidgets-7.1.2-py2.py3-none-any.whl (68kB)
100% |████████████████████████████████| 71kB 3.5MB/s
Collecting notebook (from jupyter)
`enter code here` Downloading notebook-5.4.1-py2.py3-none-any.whl (8.0MB)
100% |████████████████████████████████| 8.0MB 106kB/s
Collecting qtconsole (from jupyter)
Downloading qtconsole-4.3.1-py2.py3-none-any.whl (108kB)
100% |████████████████████████████████| 112kB 4.9MB/s
Collecting jupyter-console (from jupyter)
Downloading jupyter_console-5.2.0-py2.py3-none-any.whl
Collecting ipykernel (from jupyter)
Downloading ipykernel-4.8.2-py2-none-any.whl (108kB)
100% |████████████████████████████████| 112kB 5.2MB/s
Collecting pandocfilters>=1.4.1 (from nbconvert->jupyter)
Downloading pandocfilters-1.4.2.tar.gz
Collecting entrypoints>=0.2.2 (from nbconvert->jupyter)
Downloading entrypoints-0.2.3-py2.py3-none-any.whl
Collecting jinja2 (from nbconvert->jupyter)
Downloading Jinja2-2.10-py2.py3-none-any.whl (126kB)
100% |████████████████████████████████| 133kB 3.2MB/s
Collecting testpath (from nbconvert->jupyter)
Downloading testpath-0.3.1-py2.py3-none-any.whl (161kB)
100% |████████████████████████████████| 163kB 2.9MB/s
Collecting mistune>=0.7.4 (from nbconvert->jupyter)
Downloading mistune-0.8.3-py2.py3-none-any.whl
Collecting nbformat>=4.4 (from nbconvert->jupyter)
Downloading nbformat-4.4.0-py2.py3-none-any.whl (155kB)
100% |████████████████████████████████| 163kB 3.5MB/s
Collecting pygments (from nbconvert->jupyter)
Downloading Pygments-2.2.0-py2.py3-none-any.whl (841kB)
100% |████████████████████████████████| 849kB 975kB/s
Collecting bleach (from nbconvert->jupyter)
Downloading bleach-2.1.3-py2.py3-none-any.whl
Collecting traitlets>=4.2 (from nbconvert->jupyter)
Downloading traitlets-4.3.2-py2.py3-none-any.whl (74kB)
100% |████████████████████████████████| 81kB 4.6MB/s
Collecting jupyter-core (from nbconvert->jupyter)
Downloading jupyter_core-4.4.0-py2.py3-none-any.whl (126kB)
100% |████████████████████████████████| 133kB 4.5MB/s
Collecting widgetsnbextension~=3.1.0 (from ipywidgets->jupyter)
Downloading widgetsnbextension-3.1.4-py2.py3-none-any.whl (2.2MB)
100% |████████████████████████████████| 2.2MB 392kB/s
Collecting ipython<6.0.0,>=4.0.0; python_version < "3.3" (from ipywidgets->jupyter)
Downloading ipython-5.5.0-py2-none-any.whl (758kB)
100% |████████████████████████████████| 768kB 1.1MB/s
Collecting Send2Trash (from notebook->jupyter)
Downloading Send2Trash-1.5.0.tar.gz
Collecting ipython-genutils (from notebook->jupyter)
Downloading ipython_genutils-0.2.0-py2.py3-none-any.whl
Collecting jupyter-client>=5.2.0 (from notebook->jupyter)
Downloading jupyter_client-5.2.3-py2.py3-none-any.whl (89kB)
100% |████████████████████████████████| 92kB 4.5MB/s
Collecting tornado>=4 (from notebook->jupyter)
Downloading tornado-5.0.1.tar.gz (504kB)
100% |████████████████████████████████| 512kB 1.5MB/s
Collecting terminado>=0.8.1 (from notebook->jupyter)
Downloading terminado-0.8.1-py2.py3-none-any.whl
Collecting prompt-toolkit<2.0.0,>=1.0.0 (from jupyter-console->jupyter)
Downloading prompt_toolkit-1.0.15-py2-none-any.whl (247kB)
100% |████████████████████████████████| 256kB 2.6MB/s
Collecting configparser>=3.5; python_version == "2.7" (from entrypoints>=0.2.2->nbconvert->jupyter)
Downloading configparser-3.5.0.tar.gz
Collecting MarkupSafe>=0.23 (from jinja2->nbconvert->jupyter)
Downloading MarkupSafe-1.0.tar.gz
Collecting jsonschema!=2.5.0,>=2.4 (from nbformat>=4.4->nbconvert->jupyter)
Downloading jsonschema-2.6.0-py2.py3-none-any.whl
Collecting html5lib!=1.0b1,!=1.0b2,!=1.0b3,!=1.0b4,!=1.0b5,!=1.0b6,!=1.0b7,!=1.0b8,>=0.99999999pre (from bleach->nbconvert->jupyter)
Downloading html5lib-1.0.1-py2.py3-none-any.whl (117kB)
100% |████████████████████████████████| 122kB 4.3MB/s
Requirement already satisfied: six in /usr/lib/python2.7/dist-packages (from bleach->nbconvert->jupyter)
Collecting decorator (from traitlets>=4.2->nbconvert->jupyter)
Downloading decorator-4.2.1-py2.py3-none-any.whl
Collecting enum34; python_version == "2.7" (from traitlets>=4.2->nbconvert->jupyter)
Downloading enum34-1.1.6-py2-none-any.whl
Collecting pexpect; sys_platform != "win32" (from ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets->jupyter)
Downloading pexpect-4.4.0-py2.py3-none-any.whl (56kB)
100% |████████████████████████████████| 61kB 5.1MB/s
Collecting backports.shutil-get-terminal-size; python_version == "2.7" (from ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets->jupyter)
Downloading backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools>=18.5 in /usr/lib/python2.7/dist-packages (from ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets->jupyter)
Collecting pathlib2; python_version == "2.7" or python_version == "3.3" (from ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets->jupyter)
Downloading pathlib2-2.3.0-py2.py3-none-any.whl
Collecting simplegeneric>0.8 (from ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets->jupyter)
Downloading simplegeneric-0.8.1.zip
Collecting pickleshare (from ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets->jupyter)
Downloading pickleshare-0.7.4-py2.py3-none-any.whl
Collecting pyzmq>=13 (from jupyter-client>=5.2.0->notebook->jupyter)
Downloading pyzmq-17.0.0-cp27-cp27mu-manylinux1_x86_64.whl (3.0MB)
100% |████████████████████████████████| 3.0MB 281kB/s
Collecting python-dateutil>=2.1 (from jupyter-client>=5.2.0->notebook->jupyter)
Downloading python_dateutil-2.7.2-py2.py3-none-any.whl (212kB)
100% |████████████████████████████████| 215kB 2.9MB/s
Collecting futures (from tornado>=4->notebook->jupyter)
Downloading futures-3.2.0-py2-none-any.whl
Collecting singledispatch (from tornado>=4->notebook->jupyter)
Downloading singledispatch-3.4.0.3-py2.py3-none-any.whl
Collecting backports_abc>=0.4 (from tornado>=4->notebook->jupyter)
Downloading backports_abc-0.5-py2.py3-none-any.whl
Collecting ptyprocess; os_name != "nt" (from terminado>=0.8.1->notebook->jupyter)
Downloading ptyprocess-0.5.2-py2.py3-none-any.whl
Collecting wcwidth (from prompt-toolkit<2.0.0,>=1.0.0->jupyter-console->jupyter)
Downloading wcwidth-0.1.7-py2.py3-none-any.whl
Collecting functools32; python_version == "2.7" (from jsonschema!=2.5.0,>=2.4->nbformat>=4.4->nbconvert->jupyter)
Downloading functools32-3.2.3-2.tar.gz
Collecting webencodings (from html5lib!=1.0b1,!=1.0b2,!=1.0b3,!=1.0b4,!=1.0b5,!=1.0b6,!=1.0b7,!=1.0b8,>=0.99999999pre->bleach->nbconvert->jupyter)
Downloading webencodings-0.5.1-py2.py3-none-any.whl
Collecting scandir; python_version < "3.5" (from pathlib2; python_version == "2.7" or python_version == "3.3"->ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets->jupyter)
Downloading scandir-1.7.tar.gz
Building wheels for collected packages: pandocfilters, Send2Trash, tornado, configparser, MarkupSafe, simplegeneric, functools32, scandir
Running setup.py bdist_wheel for pandocfilters ... done
Stored in directory: /home/mukul/.cache/pip/wheels/08/5b/5b/66b3cde6f8215f8345479ef3699d6ddbb860f6ea7072008f8b
Running setup.py bdist_wheel for Send2Trash ... done
Stored in directory: /home/mukul/.cache/pip/wheels/7e/53/4f/bba4eeb954fb986a22a98b8ead0fce8f4f1f4e8028ed715530
Running setup.py bdist_wheel for tornado ... done
Stored in directory: /home/mukul/.cache/pip/wheels/fd/0d/50/bb8bebaf371beed13f2502466cdadc9ef2afb3302e66a56a36
Running setup.py bdist_wheel for configparser ... done
Stored in directory: /home/mukul/.cache/pip/wheels/1c/bd/b4/277af3f6c40645661b4cd1c21df26aca0f2e1e9714a1d4cda8
Running setup.py bdist_wheel for MarkupSafe ... done
Stored in directory: /home/mukul/.cache/pip/wheels/88/a7/30/e39a54a87bcbe25308fa3ca64e8ddc75d9b3e5afa21ee32d57
Running setup.py bdist_wheel for simplegeneric ... done
Stored in directory: /home/mukul/.cache/pip/wheels/7b/31/08/c85e74c84188cbec6a6827beec4d640f2bd78ae003dc1ec09d
Running setup.py bdist_wheel for functools32 ... done
Stored in directory: /home/mukul/.cache/pip/wheels/b5/83/8b/2de165caa2da68be141fbf343fd291fbcae73094c213ba3f5c
Running setup.py bdist_wheel for scandir ... done
Stored in directory: /home/mukul/.cache/pip/wheels/3d/51/95/79b749f7e52b5dea9e01b5c72da1c728151fc65a3984c37bec
Successfully built pandocfilters Send2Trash tornado configparser MarkupSafe simplegeneric functools32 scandir
Installing collected packages: pandocfilters, configparser, entrypoints, MarkupSafe, jinja2, testpath, mistune, ipython-genutils, decorator, enum34, traitlets, jupyter-core, functools32, jsonschema, nbformat, pygments, webencodings, html5lib, bleach, nbconvert, Send2Trash, futures, singledispatch, backports-abc, tornado, pyzmq, python-dateutil, jupyter-client, ptyprocess, terminado, wcwidth, prompt-toolkit, pexpect, backports.shutil-get-terminal-size, scandir, pathlib2, simplegeneric, pickleshare, ipython, ipykernel, notebook, widgetsnbextension, ipywidgets, qtconsole, jupyter-console, jupyter
Exception:
Traceback (most recent call last):
File "/home/mukul/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/mukul/.local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/home/mukul/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/home/mukul/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/home/mukul/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/home/mukul/.local/lib/python2.7/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/home/mukul/.local/lib/python2.7/site-packages/pip/wheel.py", line 323, in clobber
shutil.copyfile(srcfile, destfile)
File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/pandocfilters.py'
While installing jupyter everything worked fine but finally I got some exceptions. I can't understand what are these.
You are receiving the error IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/pandocfilters.py' because you are running pip install under a normal user.
You can either run this same command with sudo pip install jupyter. This will give you root privileges when installing, or you can check out running this in a virtualenv. You can read up more on virtualenv at https://docs.python.org/3/tutorial/venv.html.