I've just installed a Python package using pip:
$ sudo pip install py_vollib
Password:
Collecting py_vollib
Downloading py_vollib-1.0.1.tar.gz
Collecting py_lets_be_rational (from py_vollib)
Downloading py_lets_be_rational-1.0.1.tar.gz
Requirement already satisfied: simplejson in /Library/Python/2.7/site-packages (from py_vollib)
Requirement already satisfied: numpy in /Library/Python/2.7/site-packages (from py_vollib)
Collecting pandas (from py_vollib)
Downloading pandas-0.20.3-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (15.0MB)
100% |████████████████████████████████| 15.1MB 54kB/s
Requirement already satisfied: scipy in /Library/Python/2.7/site-packages (from py_vollib)
Requirement already satisfied: pytz>=2011k in /Library/Python/2.7/site-packages (from pandas->py_vollib)
Requirement already satisfied: python-dateutil in /Library/Python/2.7/site-packages (from pandas->py_vollib)
Requirement already satisfied: six>=1.5 in /Library/Python/2.7/site-packages (from python-dateutil->pandas->py_vollib)
Installing collected packages: py-lets-be-rational, pandas, py-vollib
Running setup.py install for py-lets-be-rational ... done
Running setup.py install for py-vollib ... done
Successfully installed pandas-0.20.3 py-lets-be-rational-1.0.1 py-vollib-1.0.1
and I've verified it's installed correctly:
$ pip freeze | grep vollib
py-vollib==1.0.1
but I can't import it in Python:
$ python
Python 2.7.13 (default, Jul 20 2017, 18:14:09)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import py_vollib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named py_vollib
Does anybody know what I'm doing wrong here?
[EDIT]
I've checked out help('modules'), which also shows the py_vollib package:
you are doing sudo pip install py_vollib which is installing the library in your root env.
If you are doing import py_vollib in ipython notebook or something, the module won't be available.
Try sudo python and then do the import
Or
do pip install py_vollib and then do python and try import py_vollib
Related
I am new to Python. I have downloaded pysnmp in spyder. But when I run my code, it shows no module named pysnmp.
!pip install pysnmp
Requirement already satisfied: pysnmp in c:\users\maxuser\appdata\local\programs\python\python311\lib\site-packages (4.4.12)
Requirement already satisfied: pysmi in c:\users\maxuser\appdata\local\programs\python\python311\lib\site-packages (from pysnmp) (0.3.4)
Requirement already satisfied: pycryptodomex in c:\users\maxuser\appdata\local\programs\python\python311\lib\site-packages (from pysnmp) (3.17)
Requirement already satisfied: pyasn1>=0.2.3 in c:\users\maxuser\appdata\local\programs\python\python311\lib\site-packages (from pysnmp) (0.4.8)
Requirement already satisfied: ply in c:\users\maxuser\appdata\local\programs\python\python311\lib\site-packages (from pysmi->pysnmp) (3.11)
[notice] A new release of pip available: 22.3.1 -> 23.0
[notice] To update, run: python.exe -m pip install --upgrade pip
But upon running the code this is shown...
File c:\users\maxuser\untitled0.py:1
from pysnmp.entity.rfc3413.oneliner import cmdgen
ModuleNotFoundError: No module named 'pysnmp'
I recently installed the requests library for python. And python does not see it, however it is installed
Console output:
C:\Users\Raitis\Desktop>pip3 install requests
Requirement already satisfied: requests in c:\users\raitis\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages (2.23.0)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\raitis\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages (from requests) (1.25.8)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\raitis\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages (from requests) (2019.11.28)
Requirement already satisfied: idna<3,>=2.5 in c:\users\raitis\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages (from requests) (2.9)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\raitis\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages (from requests) (3.0.4)
C:\Users\Raitis\Desktop>py
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'requests'
It is installed indeed, and we can see that in direcory(Screenshot:https://prnt.sc/r90uhr) and python's path is added to the enviroment PATH(Screenshot: https://prnt.sc/r90rus)
Try installing the request library using this command instead
py -m pip install requests
Or in your case use,
py -m pip3 install requests
I am trying to install the following version of TensorFlow-GPU because the author of gitrepo has suggested it here.
[jalal#goku examples]$ pip install tensorflow-gpu~=1.14
Collecting tensorflow-gpu~=1.14
Using cached https://files.pythonhosted.org/packages/a5/ad/933140e74973fb917a194ab814785e7c23680ca5dee6d663a509fe9579b6/tensorflow_gpu-1.15.0-cp36-cp36m-manylinux2010_x86_64.whl
Processing /home/grad3/jalal/.cache/pip/wheels/d7/de/2e/efa132238792efb6459a96e85916ef8597fcb3d2ae51590dfd/wrapt-1.11.2-cp36-cp36m-linux_x86_64.whl
Requirement already satisfied: protobuf>=3.6.1 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (3.11.0)
Requirement already satisfied: tensorflow-estimator==1.15.1 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.15.1)
Requirement already satisfied: six>=1.10.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.13.0)
Requirement already satisfied: wheel>=0.26 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (0.33.6)
Requirement already satisfied: tensorboard<1.16.0,>=1.15.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.15.0)
Requirement already satisfied: termcolor>=1.1.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.1.0)
Requirement already satisfied: opt-einsum>=2.3.2 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (3.1.0)
Collecting keras-applications>=1.0.8
Using cached https://files.pythonhosted.org/packages/71/e3/19762fdfc62877ae9102edf6342d71b28fbfd9dea3d2f96a882ce099b03f/Keras_Applications-1.0.8-py3-none-any.whl
Requirement already satisfied: keras-preprocessing>=1.0.5 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.0.5)
Requirement already satisfied: grpcio>=1.8.6 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.25.0)
Requirement already satisfied: absl-py>=0.7.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (0.8.1)
Requirement already satisfied: google-pasta>=0.1.6 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (0.1.8)
Processing /home/grad3/jalal/.cache/pip/wheels/5c/2e/7e/a1d4d4fcebe6c381f378ce7743a3ced3699feb89bcfbdadadd/gast-0.2.2-cp36-none-any.whl
Requirement already satisfied: astor>=0.6.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (0.8.0)
Requirement already satisfied: numpy<2.0,>=1.16.0 in /home/grad3/jalal/.local/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.17.4)
Requirement already satisfied: setuptools in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from protobuf>=3.6.1->tensorflow-gpu~=1.14) (42.0.2)
Requirement already satisfied: markdown>=2.6.8 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow-gpu~=1.14) (3.1.1)
Requirement already satisfied: werkzeug>=0.11.15 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow-gpu~=1.14) (0.16.0)
Requirement already satisfied: h5py in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from keras-applications>=1.0.8->tensorflow-gpu~=1.14) (2.7.1)
Installing collected packages: wrapt, keras-applications, gast, tensorflow-gpu
Found existing installation: wrapt 1.10.11
ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
How do I fix this installation issue?
A little information about my system:
$ cat /proc/version
Linux version 3.10.0-1062.4.3.el7.x86_64 (mockbuild#kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) ) #1 SMP Wed Nov 13 23:58:53 UTC 2019
$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.7.1908 (Core)
Release: 7.7.1908
Codename: Core
$ python
Python 3.6.7 | packaged by conda-forge | (default, Feb 28 2019, 09:07:38)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tensorflow'
>>> import deepposekit
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages/deepposekit/__init__.py", line 20, in <module>
from deepposekit.io import TrainingGenerator, DataGenerator
File "/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages/deepposekit/io/__init__.py", line 18, in <module>
from deepposekit.io.BaseGenerator import BaseGenerator
File "/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages/deepposekit/io/BaseGenerator.py", line 16, in <module>
from tensorflow.keras.utils import Sequence
ModuleNotFoundError: No module named 'tensorflow'
I have the following GPUs:
$ nvidia-smi
Sat Dec 7 22:48:51 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.67 Driver Version: 418.67 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 108... Off | 00000000:05:00.0 On | N/A |
| 0% 28C P0 61W / 250W | 1462MiB / 11178MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce GTX 108... Off | 00000000:06:00.0 Off | N/A |
| 0% 28C P8 13W / 250W | 12MiB / 11178MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
And here's my CUDA version:
$ cat /usr/local/cuda/version.txt
CUDA Version 10.0.130
$ pip list | grep tensorflow
tensorflow-estimator 1.15.1
[jalal#goku examples]$ yum search wrapt
Loaded plugins: aliases, changelog, copr, fastestmirror, kabi, langpacks, priorities, tmprepo, verify, versionlock
Loading support for Red Hat kernel ABI
Loading mirror speeds from cached hostfile
* centos-sclo-rh: mirrors.seas.harvard.edu
* centos-sclo-sclo: mirrors.seas.harvard.edu
* remi-php70: mirror.pit.teraswitch.com
* remi-php71: mirror.pit.teraswitch.com
* remi-php73: mirror.pit.teraswitch.com
* remi-safe: mirror.pit.teraswitch.com
* ulyaoth: repos.ulyaoth.com
* webtatic: us-east.repo.webtatic.com
Atom 140/140
1075 packages excluded due to repository priority protections
=============================================================================================== N/S matched: wrapt ================================================================================================
python-wrapt.x86_64 : A Python module for decorators, wrappers and monkey patching
python36-wrapt.x86_64 : A Python module for decorators, wrappers and monkey patching
Name and summary matches only, use "search all" for everything.
[jalal#goku examples]$ sudo yum remove python-wrapt.x86_64
Loaded plugins: aliases, changelog, copr, fastestmirror, kabi, langpacks, priorities, tmprepo, verify, versionlock
Loading support for Red Hat kernel ABI
No Match for argument: python-wrapt.x86_64
No Packages marked for removal
[jalal#goku examples]$ sudo yum remove python36-wrapt.x86_64
Loaded plugins: aliases, changelog, copr, fastestmirror, kabi, langpacks, priorities, tmprepo, verify, versionlock
Loading support for Red Hat kernel ABI
No Match for argument: python36-wrapt.x86_64
No Packages marked for removal
Try to use the following commands:
pip install wrapt --upgrade --ignore-installed
pip install tensorflow-gpu
Good luck.
First, do the following:
$ conda update wrapt
And then,
[jalal#goku examples]$ pip install tensorflow-gpu~=1.14
Collecting tensorflow-gpu~=1.14
Using cached https://files.pythonhosted.org/packages/a5/ad/933140e74973fb917a194ab814785e7c23680ca5dee6d663a509fe9579b6/tensorflow_gpu-1.15.0-cp36-cp36m-manylinux2010_x86_64.whl
Requirement already satisfied: numpy<2.0,>=1.16.0 in /home/grad3/jalal/.local/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.17.4)
Requirement already satisfied: google-pasta>=0.1.6 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (0.1.8)
Requirement already satisfied: wrapt>=1.11.1 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.11.2)
Requirement already satisfied: absl-py>=0.7.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (0.8.1)
Collecting keras-applications>=1.0.8
Using cached https://files.pythonhosted.org/packages/71/e3/19762fdfc62877ae9102edf6342d71b28fbfd9dea3d2f96a882ce099b03f/Keras_Applications-1.0.8-py3-none-any.whl
Requirement already satisfied: six>=1.10.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.13.0)
Requirement already satisfied: keras-preprocessing>=1.0.5 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.0.5)
Requirement already satisfied: opt-einsum>=2.3.2 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (3.1.0)
Requirement already satisfied: protobuf>=3.6.1 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (3.11.0)
Requirement already satisfied: tensorboard<1.16.0,>=1.15.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.15.0)
Requirement already satisfied: wheel>=0.26 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (0.33.6)
Requirement already satisfied: termcolor>=1.1.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.1.0)
Collecting tensorflow-estimator==1.15.1
Using cached https://files.pythonhosted.org/packages/de/62/2ee9cd74c9fa2fa450877847ba560b260f5d0fb70ee0595203082dafcc9d/tensorflow_estimator-1.15.1-py2.py3-none-any.whl
Processing /home/grad3/jalal/.cache/pip/wheels/5c/2e/7e/a1d4d4fcebe6c381f378ce7743a3ced3699feb89bcfbdadadd/gast-0.2.2-cp36-none-any.whl
Requirement already satisfied: astor>=0.6.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (0.8.0)
Requirement already satisfied: grpcio>=1.8.6 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.25.0)
Requirement already satisfied: h5py in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from keras-applications>=1.0.8->tensorflow-gpu~=1.14) (2.7.1)
Requirement already satisfied: setuptools in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from protobuf>=3.6.1->tensorflow-gpu~=1.14) (42.0.2.post20191201)
Requirement already satisfied: werkzeug>=0.11.15 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow-gpu~=1.14) (0.16.0)
Requirement already satisfied: markdown>=2.6.8 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow-gpu~=1.14) (3.1.1)
Installing collected packages: keras-applications, tensorflow-estimator, gast, tensorflow-gpu
Found existing installation: Keras-Applications 1.0.6
Uninstalling Keras-Applications-1.0.6:
Successfully uninstalled Keras-Applications-1.0.6
Found existing installation: gast 0.3.2
Uninstalling gast-0.3.2:
Successfully uninstalled gast-0.3.2
Successfully installed gast-0.2.2 keras-applications-1.0.8 tensorflow-estimator-1.15.1 tensorflow-gpu-1.15.0
You can try the followings in sequence:
pip install -U --ignore-installed wrapt
pip install tensorflow
Find that cache .whl file in your like /home/grad3/jalal/.cache/pip/wheels/...
Remove it.
Then re-do as the normal installation procedure. It works for me.
Updating Conda and trying to install Tensorflow again worked for me:
conda update --all
pip install tensorflow
pip install --upgrade pip
conda update --all
pip install tensorflow
Remove file wrapt-1.10.11.egg-info by command sudo rm /usr/lib/python3/dist-packages/wrapt-1.10.11.egg-info
Then install tensorflow again
I have single line in my py file:
from requests_toolbelt.multipart.encoder import MultipartEncoder
When I run it, I am getting following error:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/requests_toolbelt/_compat.py", line 49, in <module>
from requests.packages.urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\workspaces\workspace6\Expe\Exp.py", line 8, in <module>
from requests_toolbelt.multipart.encoder import MultipartEncoder
File "/usr/lib/python3.6/site-packages/requests_toolbelt/__init__.py", line 12, in <module>
from .adapters import SSLAdapter, SourceAddressAdapter
File "/usr/lib/python3.6/site-packages/requests_toolbelt/adapters/__init__.py", line 12, in <module>
from .ssl import SSLAdapter
File "/usr/lib/python3.6/site-packages/requests_toolbelt/adapters/ssl.py", line 16, in <module>
from .._compat import poolmanager
File "/usr/lib/python3.6/site-packages/requests_toolbelt/_compat.py", line 51, in <module>
from urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine'
I have just installed requests_toolbelt in cygwin on Windows:
$ pip3 install requests-toolbelt
Collecting requests-toolbelt
Downloading https://files.pythonhosted.org/packages/97/8a/d710f792d6f6ecc089c5e55b66e66c3f2f35516a1ede5a8f54c13350ffb0/requests_toolbelt-0.8.0-py2.py3-none-any.whl (54kB)
100% |████████████████████████████████| 61kB 841kB/s
Requirement already satisfied: requests<3.0.0,>=2.0.1 in /usr/lib/python3.6/site-packages (from requests-toolbelt)
Requirement already satisfied: urllib3==1.20 in /usr/lib/python3.6/site-packages (from requests<3.0.0,>=2.0.1->requests-toolbelt)
Installing collected packages: requests-toolbelt
Successfully installed requests-toolbelt-0.8.0
You are using pip version 9.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Also note that I am running behind proxy.
I am running python 3.6.4:
$ python3
Python 3.6.4 (default, Jan 7 2018, 15:53:53)
[GCC 6.4.0] on cygwin
Considering all these, I am not sure why I am getting this error. Is it like requests_toolbelt have dependency appengine which is not installed? But it would have been installed while installing requests_toolbelt, right?
Update
I was getting above error when I am running the python file in eclipse with PyDev plugin. However I just tried running the same line through python shell >>> in cygwin command prompt and its giving same error.
Update 2
Tried installing same on python under Windows (not on cygwin) and it worked:
C:\Users\user1>pip install requests-toolbelt
Collecting requests-toolbelt
Downloading https://files.pythonhosted.org/packages/97/8a/d710f792d6f6ecc089c5e55b66e66c3f2f35516a1ede5a8f54c13350ffb0/requests_toolbelt-0.8.0-py2.py3-none-any.whl (54kB)
100% |████████████████████████████████| 61kB 1.7MB/s
Collecting requests<3.0.0,>=2.0.1 (from requests-toolbelt)
Downloading https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl (91kB)
100% |████████████████████████████████| 92kB 1.9MB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests<3.0.0,>=2.0.1->requests-toolbelt)
Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
100% |████████████████████████████████| 143kB 2.4MB/s
Collecting urllib3<1.24,>=1.21.1 (from requests<3.0.0,>=2.0.1->requests-toolbelt)
Downloading https://files.pythonhosted.org/packages/bd/c9/6fdd990019071a4a32a5e7cb78a1d92c53851ef4f56f62a3486e6a7d8ffb/urllib3-1.23-py2.py3-none-any.whl (133kB)
100% |████████████████████████████████| 143kB 2.4MB/s
Collecting certifi>=2017.4.17 (from requests<3.0.0,>=2.0.1->requests-toolbelt)
Downloading https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl (150kB)
100% |████████████████████████████████| 153kB 1.5MB/s
Collecting idna<2.8,>=2.5 (from requests<3.0.0,>=2.0.1->requests-toolbelt)
Downloading https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl (58kB)
100% |████████████████████████████████| 61kB 1.4MB/s
Installing collected packages: chardet, urllib3, certifi, idna, requests, requests-toolbelt
Successfully installed certifi-2018.4.16 chardet-3.0.4 idna-2.7 requests-2.19.1 requests-toolbelt-0.8.0 urllib3-1.23
You are using pip version 9.0.2, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Users\user1>python
Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from requests_toolbelt.multipart.encoder import MultipartEncoder
>>>
Still guessing why it was not working on cygwin.
This seems to be an issue in requests_toolbelt which might be fixed in 0.7.1.
Try to install newest version of it.
https://github.com/mvantellingen/python-zeep/issues/413
I'm executing bellow command in Mac (High Sierra) as a part of getting started with pyAudioAnalysis.
pip install numpy matplotlib scipy sklearn hmmlearn simplejson eyed3 pydub
I'm getting following error during the installation process. Appreciate your input.
matplotlib 1.3.1 has requirement numpy>=1.5, but you'll have numpy 1.8.0rc1 which is incompatible.
Please find more information below,
Channas-MacBook-Pro:~ channa$ python
Python 2.7.10 (default, Oct 6 2017, 22:29:07)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
[3]+ Stopped python
Channas-MacBook-Pro:~ channa$ pip -V
pip 10.0.0b2 from /Library/Python/2.7/site-packages/pip-10.0.0b2-py2.7.egg/pip (python 2.7)
Channas-MacBook-Pro:~ channa$ sudo pip install numpy matplotlib scipy sklearn hmmlearn simplejson eyed3 pydub
The directory '/Users/channa/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/channa/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: numpy in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (1.8.0rc1)
Requirement already satisfied: matplotlib in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (1.3.1)
Requirement already satisfied: scipy in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (0.13.0b1)
Collecting sklearn
Downloading sklearn-0.0.tar.gz
Collecting hmmlearn
Downloading hmmlearn-0.2.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (183kB)
100% |████████████████████████████████| 184kB 189kB/s
Collecting simplejson
Downloading simplejson-3.13.2.tar.gz (79kB)
100% |████████████████████████████████| 81kB 256kB/s
Collecting eyed3
Downloading eyeD3-0.8.5-py2.py3-none-any.whl (167kB)
100% |████████████████████████████████| 174kB 100kB/s
Collecting pydub
Downloading pydub-0.21.0-py2.py3-none-any.whl
Requirement already satisfied: python-dateutil in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from matplotlib) (1.5)
Collecting tornado (from matplotlib)
Downloading tornado-5.0.1.tar.gz (504kB)
100% |████████████████████████████████| 512kB 354kB/s
Requirement already satisfied: pyparsing>=1.5.6 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from matplotlib) (2.0.1)
Collecting nose (from matplotlib)
Downloading nose-1.3.7-py2-none-any.whl (154kB)
100% |████████████████████████████████| 163kB 213kB/s
Collecting scikit-learn (from sklearn)
Downloading scikit_learn-0.19.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (8.0MB)
100% |████████████████████████████████| 8.0MB 259kB/s
Collecting python-magic (from eyed3)
Downloading python_magic-0.4.15-py2.py3-none-any.whl
Collecting pathlib (from eyed3)
Downloading pathlib-1.0.1.tar.gz (49kB)
100% |████████████████████████████████| 51kB 54kB/s
Requirement already satisfied: six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from eyed3) (1.4.1)
Collecting futures (from tornado->matplotlib)
Downloading futures-3.2.0-py2-none-any.whl
Collecting singledispatch (from tornado->matplotlib)
Downloading singledispatch-3.4.0.3-py2.py3-none-any.whl
Collecting backports_abc>=0.4 (from tornado->matplotlib)
Downloading backports_abc-0.5-py2.py3-none-any.whl
matplotlib 1.3.1 has requirement numpy>=1.5, but you'll have numpy 1.8.0rc1 which is incompatible.
Installing collected packages: scikit-learn, sklearn, hmmlearn, simplejson, python-magic, pathlib, eyed3, pydub, futures, singledispatch, backports-abc, tornado, nose
Running setup.py install for sklearn ... done
Running setup.py install for simplejson ... done
Running setup.py install for pathlib ... done
Running setup.py install for tornado ... done
Consider using the `--user` option or check the permissions
I was able to solve this with #Jacob's solution with some additional steps. I'll post it here for anyone else facing this.
Firstly as Jacob mentioned I downloaded and installed the latest Python 2.7.14+.
Executed sudo easy_install pip to install pip again
Executed sudo pip install numpy
Download the latest version of Python 2.7 (https://www.python.org/downloads/), matplotlib install should work fine after that.
Also if it's a brand new mac, just make sure that you have command line tools installed