This question already has answers here:
Unable to install Python libraries
(7 answers)
Closed 4 years ago.
I am trying to install some packages with pip and getting error
pip install docker==2.7.0
Could not find a version that satisfies the requirement docker==2.7.0 (from versions: )
No matching distribution found for docker==2.7.0
With -vvv option:
HTTPError: 403 Client Error: TLSv1.2+ is required for url: https://pypi.python.org/pypi/pip/json
Few days ago there was no such problem
pip version: pip 9.0.1 from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (python 2.7)
The problem was in old openssl linked to system python.
So I've uninstall all python distribs from system and install last python with brew install python#2
One can check openssl version linked to python like that
Python 2.7.14 (default, Mar 22 2018, 15:04:47)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> ssl.OPENSSL_VERSION
'OpenSSL 1.0.2o 27 Mar 2018'
curl https://bootstrap.pypa.io/get-pip.py | python -
This worked for me, Mac Sierra 10.12.6... https://github.com/pypa/packaging-problems/issues/130
Related
I'm trying to use python 3.6.4:
n155-p250:Desktop sahandzarrinkoub$ brew upgrade python3
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
bash-preexec jenkins presto ttf2eot
cppcheck khard qpdf txr
docker-gen lz4 scummvm unixodbc
duplicity mdp scummvm-tools verilator
get-flash-videos mycli sslsplit
get_iplayer ola tin
gobuster ponyc tokei
Error: python3 3.6.4_2 already installed
n155-p250:Desktop sahandzarrinkoub$ python3
Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Even though I already have it installed, I can't use it by typing python3. How do I solve this? I want to remove 3.6.2 and have python3 map to 3.6.4.
As your python3 is not linked to homebrew one, you should let homebrew force relink python3:
rm /usr/local/bin/python3
brew unlink python3; brew link --overwrite python3
link of python3 on my machine is:
/usr/local/bin/python3 -> ../Cellar/python3/3.6.4/bin/python3
To update python run brew update in the Terminal (this will update Homebrew)
Then brew upgrade python3
At the end you can run brew cleanup python3 to remove the older version
I have installed wheel successfully as follows:
(py2.7) [abcd#cluster1830 ~]$ pip install /data/pythonlibs/wheel-0.29.0-py2.py3-none-any.whl
Processing /data/pythonlibs/wheel-0.29.0-py2.py3-none-any.whl
Installing collected packages: wheel
Found existing installation: wheel 0.30.0a0
Uninstalling wheel-0.30.0a0:
Successfully uninstalled wheel-0.30.0a0
Successfully installed wheel-0.29.0
Then I tried to use the following command to check the installed libraries,
(py2.7) [abcd#cluster1830 ~]$ pip freeze > /data/dump.txt
Opening the dump.txt, I cannot find the installed wheel library,
(py2.7) [abcd#cluster1830 ~]$ cat /data/dump.txt
protobuf==3.1.0.post1
six==1.10.0
At the same time, I tried import wheel from python,
(py2.7) [abcd#cluster1830 ~]$ python
Python 2.7.9 (default, Apr 11 2017, 10:32:43)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wheel
>>>
Looks like it works, which confuses me. Whether I have wheel library installed or not?
During my installing tensorflow, I had the following error message,
Could not find any downloads that satisfy the requirement wheel>=0.26 (from tensorflow-gpu==1.0.1)
No distributions at all found for wheel>=0.26 (from tensorflow-gpu==1.0.1)
I've got statsmodels 0.5.0 and I want to upgrade to the latest version which is 0.6.0.
So I do
$ git clone git://github.com/statsmodels/statsmodels.git
$ cd statsmodels
$ pip install .
But, I get an error:
error: can't copy 'statsmodels/nonparametric/_smoothers_lowess.c': doesn't exist or not a regular file
Apparently the solution is to install Cython (which I thought was already installed, or how could statsmodels 0.5.0 ever have worked in the first place..?!?).
Anyway, so it becomes:
$ git clone git://github.com/statsmodels/statsmodels.git
$ cd statsmodels
$ pip install cython
$ pip install .
$ python
Python 2.7.3 |CUSTOM| (default, Apr 11 2012, 17:52:16)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import statsmodels
>>> statsmodels.version.full_version
'0.6.0.dev-b472807'
I made a Python script that needs a libtiff module to run. Do you have any suggestions on how to install libtiff? I tried to do it using fink, but I got the following error:
Failed: no package found for specification libtiff!
I also installed libtiff using brew, and in this case I get
ImportError: No module named libtiff
Homebrew worked fine for me. Have you installed the Python bindings for libtiff? For example, ...
% brew install libtiff
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libtiff-4.0.3.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libtiff-4.0.3.mavericks.bottle.tar.gz
/usr/local/Cellar/libtiff/4.0.3: 254 files, 3.8M
% brew install python
% pip install --upgrade setuptools
% pip install --upgrade pip
% pip install numpy
% pip install -e svn+http://pylibtiff.googlecode.com/svn/trunk/
% python
Python 2.7.6 (default, Mar 12 2014, 18:28:55)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import libtiff
>>> libtiff
<module 'libtiff' from '/Users/me/src/svn/libtiff/__init__.pyc'>
>>>
This question already has answers here:
Installing distribute in Python 3.3 Ubuntu
(2 answers)
Closed 9 years ago.
When installing distribute-0.6.49 with python3.3.2 in Ubuntu system, error encountered
....blablabla followed by...
"Compression requires the (missing) zlib module")
RuntimeError: Compression requires the (missing) zlib module
I have checked previous solutions that I need to install zlib package, but Should I re install my python again before that? can't I install zlib over it?
If re-installing of python needed, Where can I find python 3.3 with zlib already therein so that i can install python as usual?
To compile Python with zlib support, you need to install the zlib1g-dev package so that Python can find the headers.
You'd need to re-install your source-compiled Python to take this along.
If you are running ubuntu then it is usually recomended that you use the package from the package manager. You can get python 3 - currently 3.3.1 with either sudo apt-get install python3 if I recall correctly or by using the software centre.
I am reasonably sure that the default distribution includes zlib.
Python 3.3.1 (default, Apr 17 2013, 22:30:32)
[GCC 4.7.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import zlib
>>> exit()