Can't install libxml2 for python with whl file - python

I am having a very hard time installing libxml2. I am trying to use a wheel file to install it with the command line. I have Python 3.8 but I don't see any .whl files for Python 3.8. Do I need to use an earlier version of Python?
Here is the error when I attempt to install with the whl file in my Python folder:
C:\Users\Jack\AppData\Local\Programs\Python\Python38-32>pip install libxml2_python-2.9.3-cp27-none-win32.whl
ERROR: libxml2_python-2.9.3-cp27-none-win32.whl is not a supported wheel on this platform.
Wheel is installed:
C:\Users\Jack\AppData\Local\Programs\Python\Python38-32>python -m pip install wheel
Requirement already satisfied: wheel in c:\users\jack\appdata\local\programs\python\python38-32\lib\site-packages (0.33.6)
And here is some more info:
C:\Users\Jack\AppData\Local\Programs\Python\Python38-32>where python
C:\Users\Jack\AppData\Local\Programs\Python\Python38-32\python.exe
C:\Users\Jack\Anaconda3\python.exe
C:\Users\Jack\AppData\Local\Programs\Python\Python38-32>where pip
C:\Users\Jack\AppData\Local\Programs\Python\Python38-32\Scripts\pip.exe
C:\Users\Jack\Anaconda3\Scripts\pip.exe
C:\Users\Jack\AppData\Local\Programs\Python\Python38-32>where pip3
C:\Users\Jack\AppData\Local\Programs\Python\Python38-32\Scripts\pip3.exe
C:\Users\Jack\AppData\Local\Programs\Python\Python38-32>python -c"import struct;print( 8 * struct.calcsize('P'))"
32

The .whl file is valid for python 2 not 3.

Related

Installing Python packages from local file system folder with pip

I am trying to install python packages from the local file system with pip as discussed in this question.
I have used pip2pi as suggested in the accepted answer in the above question.
dmanna#ubuntu:~$ mkdir -p pyt/pkg
dmanna#ubuntu:~$ pip2tgz pyt/pkg/ patroni[zookeeper]
The downloaded packages
dmanna#ubuntu:~$ ls /home/dmanna/pyt/pkg/
cdiff-1.0.tar.gz
certifi-2018.4.16-py2.py3-none-any.whl
chardet-3.0.4-py2.py3-none-any.whl
click-6.7-py2.py3-none-any.whl
idna-2.7-py2.py3-none-any.whl
kazoo-2.5.0-py2.py3-none-any.whl
patroni-1.4.4.tar.gz
prettytable-0.7.2.tar.bz2
psutil-5.4.6.tar.gz
psycopg2-2.7.4.tar.gz
python_dateutil-2.7.3-py2.py3-none-any.whl
pytz-2018.4-py2.py3-none-any.whl
PyYAML-3.12.tar.gz
requests-2.19.1-py2.py3-none-any.whl
six-1.11.0-py2.py3-none-any.whl
tzlocal-1.5.1.tar.gz
urllib3-1.23-py2.py3-none-any.whl
Then when I am trying to install the required package from the above local directory. It is giving me the below error
dmanna#ubuntu:~$ sudo pip install --no-index --find-links=pyt/pkg/patroni-1.4.4.tar.gz patroni[zookeeper]
Ignoring indexes: https://pypi.python.org/simple/
Downloading/unpacking patroni[zookeeper]
Running setup.py (path:/tmp/pip_build_root/patroni/setup.py) egg_info for package patroni
Installing extra requirements: 'zookeeper'
Downloading/unpacking urllib3>=1.19.1,!=1.21 (from patroni[zookeeper])
Could not find any downloads that satisfy the requirement urllib3>=1.19.1,!=1.21 (from patroni[zookeeper])
Cleaning up...
No distributions at all found for urllib3>=1.19.1,!=1.21 (from patroni[zookeeper])
Storing debug log for failure in /home/dmanna/.pip/pip.log
Can someone let me know what I am doing wrong?
Python - 2.7.6
PIP - 1.5.4
Ubuntu 14.04
--find-links=pyt/pkg
Find links in the directory, not in the patroni-1.4.4.tar.gz archive.

PyHook for Python 3.6

Hello does anyone have succeded in installing pyHook on the last python version
C:\Users\T>python --version
Python 3.6.4
C:\Users\T>pip install pyHook
Collecting pyHook Could not find a version that satisfies the requirement pyHook (from versions: ) No matching distribution found for pyHook
C:\Users\T>pip install pyHook-1.5.1-cp36-cp36m-win_amd64.whl
pyHook-1.5.1-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.
Everythingi've try so far are not working at all.
1) You're gonna wanna visit https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyhook download the version with "36" in the name.
2) Open cmd, git cmd, or git bash,
*On cmd change directory into the location where pip and the whl file are stored, type pip install (whl name with 36 in the version name)
*git cmd is the same thing
*On git bash, cd into the directory with the whl and pip and type ./pip install (whl name)
I had the same problem as you, but it turned out the only problem was the file version I was downloading. Make sure you're downloading the version that's compatible with the Python you're using.

Twisted is not a supported wheel on this platform

Navigate to the directory that contains the .whl file and type:
pip install Twisted-17.9.0-cp27-cp27m-win32.whl
and I got:
Twisted-17.9.0-cp27-cp27m-win32.whl is not a supported wheel on this
platform.
I also tried 64 bit version had the same error message:
pip install Twisted-17.9.0-cp27-cp27m-win_amd64.whl
I have checked:
pip install wheel
Requirement already satisfied: wheel in
c:\users\yang\appdata\local\programs\python\python36\lib\site-packages
My OS: Windows 7, 64 bit
It's so obvious. I didn't realize that this "cp27" in the file name means the python version. Twisted-17.9.0-cp27-cp27m-win32.whl is for python 2.7 but I had 3.6.

Installing gmpy2 on windows using pre-compiled binaries

I am trying to install the gmpy2 package as its an requirement for the PHE package. As suggested in "GMPY2 not installing", I have tried to install it via pre-compliled binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/.
However when I try to install it via
pip install gmpy2-2.0.8-cp36-cp36m-win32.whl
I get the following result:
C:\Users\adria\Desktop>pip install gmpy2-2.0.8-cp36-cp36m-win32.whl
Requirement 'gmpy2-2.0.8-cp36-cp36m-win32.whl' looks like a filename, but the file does not exist
Processing c:\users\adria\desktop\gmpy2-2.0.8-cp36-cp36m-win32.whl
Exception:
Traceback (most recent call last): (...)
Is it a problem that the download from http://www.lfd.uci.edu/~gohlke/pythonlibs/ is saved as zip file?
I use Python 3.6.3 on Win10.
If you try to install without specifying the file extension (i,e : pip install gmpy2-2.0.8-cp36-cp36m-win_amd64) it won't work cause it will try to download the package from pypi repository:
C:\Users\bobolafrite\Downloads>pip install gmpy2-2.0.8-cp36-cp36m-win_amd64
Collecting gmpy2-2.0.8-cp36-cp36m-win_amd64
Could not find a version that satisfies the requirement gmpy2-2.0.8-cp36-cp36m-win_amd64 (from versions: )
No matching distribution found for gmpy2-2.0.8-cp36-cp36m-win_amd64
But if you try with the extension (i,e : pip install gmpy2-2.0.8-cp36-cp36m-win_amd64.whl)
C:\Users\bobolafrite\Downloads>pip install gmpy2-2.0.8-cp36-cp36m-win_amd64.whl
Processing c:\users\bobolafrite\downloads\gmpy2-2.0.8-cp36-cp36m-win_amd64.whl
Installing collected packages: gmpy2
Successfully installed gmpy2-2.0.8

Installing Pillow on Python 2.7

When I try to install Pillow (as a wheel file)
C:\Python27\Scripts>pip install C:\Users\karth\Desktop\Pillow-3.4.2-cp36-cp36m-win_amd64.whl
I get the following error.
Pillow-3.4.2-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.
You have a wheel file which is expecting a different Python version.
The cp36, indicates CPython 3.6, i.e. Python 3.6. You are running Python 2.7.
Either update your Python version, or more suitably, get a wheel file of the correct version from PyPi https://pypi.python.org/pypi/Pillow/4.0.0

Categories