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)
Related
I want to install lxml with python3 on my windows machine, but it complains there is lack of libxml2 so that I can't compile it with Visual Studio, I think.
I googled and found that I maybe have to download "un-official" wheel myself from here and install that with pip, but I can't do that since it seems all the wheels are not supported, by the way, I am using Pycharms' venv
(venv) D:\work\bigquery - Copy>python
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
(venv) D:\work\bigquery - Copy>pip --version
pip 19.0.3 from d:\work\bigquery - copy\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip (python 3.8)
(venv) D:\work\bigquery - Copy>pip install lxml-4.5.2-cp38-cp38-win_amd64.whl
lxml-4.5.2-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.
(venv) D:\work\bigquery - Copy>pip install lxml-4.5.2-cp39-cp39-win32.whl
lxml-4.5.2-cp39-cp39-win32.whl is not a supported wheel on this platform.
(venv) D:\work\bigquery - Copy>pip install lxml-4.5.2-cp38-cp38-win32.whl
lxml-4.5.2-cp38-cp38-win32.whl is not a supported wheel on this platform.
I have tried numbers of wheels of that package, but all seems not to work, What could be wrong?
Using pip install lxml-4.5.2-cp38-cp38-win_amd64.whl with the cmd console instead of using venv of PyCharm solved this. Post here in case it may inspire someone meeting a similar issue.
After installing the lib with cmd console I needed, I could create a new venv that inherits the global site-packages.
I have installed python into my command prompt(cmd) btw
command prompt:
C:\Users\*****> python -m pip install termcolor
Collecting termcolor
Downloading https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz
Installing collected packages: termcolor
Running setup.py install for termcolor ... done
Successfully installed termcolor-1.1.0
You are using pip version 9.0.1, however version 19.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Users\*****> python
#going into python now
Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 17:26:49) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from termcolor import colored
>>> print(colored("hi","green"))
right here is the weird output:
[32mhi[0m
I have tried python shell and it does not work.(see pic below)
if you are a Windows user, you need to do one extra step. Install the module named colorama. Then, at the top of your code include the code:
from colorama import init
init(autoreset = True)
Here's how to reproduce my issue:
Create a new virtualenv:
$ virtualenv testenv --python=/usr/bin/python3.6
Running virtualenv with interpreter /usr/bin/python3.6
Using base prefix '/usr'
New python executable in testenv/bin/python3.6
Also creating executable in testenv/bin/python
Installing setuptools, pip, wheel...done.
$ source testenv/bin/activate
(testenv) $ cd test
Install jieba and check __version__:
(testenv) test$ pip3 install jieba
Collecting jieba
Installing collected packages: jieba
Successfully installed jieba-0.39
(testenv) test$ python
Python 3.6.5 (default, Mar 29 2018, 03:28:50)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import jieba
>>> jieba.__version__
'0.39'
>>> Quit (core dumped)
Ok, version 0.39.
Install jieba3k:
(testenv) test$ pip3 install jieba3k
Collecting jieba3k
Installing collected packages: jieba3k
Successfully installed jieba3k-0.35.1
Recheck jieba __version__:
(testenv) test$ python
Python 3.6.5 (default, Mar 29 2018, 03:28:50)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import jieba
>>> jieba.__version__
'0.34'
>>> Quit (core dumped)
New version is 0.34.
Why is this happening? And how can I avoid this?
jieba and jieba3k aren't two different packages, they are two different versions of the same package with jieba being newer. When you install jieba3k it overrides package jieba with older version.
In short: forget about jieba3k, use only jieba.
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
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'>
>>>