Unsupported Wheel Error when pip installing PyTorch without Conda - python

I have been trying to install PyTorch in Windows 10 for Python 3.7.1
I do not have Anaconda on my machine, and do not wish to install it. I believe I have already satisfied all the necessary prerequisites (CUDA v10.0, NumPy). When I run the following installation command in the admin command line, (found on the PyTorch webpage):
pip3 install https://download.pytorch.org/whl/cu100/torch-1.0.0-cp37-cp37m-win_amd64.whl
I received the following error:
torch-1.0.0-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.
I tried downloading the wheel file in my browser, then running a modified command in my downloads directory.
pip install torch-1.0.0-cp37-cp37m-win_amd64.whl
I received the same error message. My pip version is up to date and I am attempting to install the appropriate wheel file for my Python version. This problem is unique to others, as I do not want to use Conda to install PyTorch. What is causing this problem?

The wheel I was trying to install required 32 bit Python, I had 64 bit Python installed. Therefore, the wheel I was trying to install was not compatible with my Python version.
Checking Python Version:
I confirmed my Python version using the following command:
python -c "import struct; print(struct.calcsize('P') * 8)"
Checking Wheel Version:
64 bit wheels typically contain amd64 or similar in their title
32 bit wheels typically contain win32or similar in their title
Switching to a 64 bit Python Installaion:
The default Windows Python installer does not have a 64 bit option. To acquire 64 bit Python, navigate to python.org/downloads/windows/, and select a version that specifies x86-64 (the other versions are all 32 bit).
Credit to phd for the comment that led to this solution.
A Redditor had the same problem here.

Related

Can't install ssh2-python wheel file with python 3.8 although it's for python3.8

I have the wheel file called ssh2_python-0.23.0-cp38-cp38-win_amd64.whl downloaded, and from my understanding the cp38 part means that it has to be installed with python 3.8 and that the win_amd64 part means that its for windows with an 64 bit architechture(which i have).
But if i try to install it with python -m pip install ssh2_python-0.23.0-cp38-cp38-win_amd64.whl i get the following error message:
ERROR: ssh2_python-0.23.0-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.
Output of python -V: Python 3.8.5
I'm running the commands in a conda enviroment, does this make a difference?
ssh2_python-0.23.0-cp38-cp38-win_amd64.whl is a wheel for 64-bit Python. It seems you have 32-bit Python. Either install 64-bit Python or use a 32-bit wheel.

Why does it continue to say that the whl file is not supported on this platform?

I'm attempting to set up pygame on another computer, but it continues to say that my wheel is not supported.
I've downloaded and upgraded my wheel and the pip install function, and I also am running python 3.7.4, please help me.
This is what it says:
ERROR: pygame-1.9.6-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.
Maybe you are using a 32 bit Python on a 64 bit Windows.
determine-if-my-python-shell-is-executing-in-32bit-or-64bit-mode-on-os
Installing the following file solved the issue: install this package
pip install pygame-1.9.6-cp37-cp37m-win32.whl

Trouble installing and importing pyHook

This is my first question on this site so I hope I format this correctly. I also am very new to programming so bear with my lack of knowledge, thank you!
I'm trying to install pyHook like so and I keep getting this error message:
C:\Python27>py -2.7 -m pip install pyHook-1.5.1-cp27-cp27M-win_amd64.whl
pyHook-1.5.1-cp27-cp27M-win_amd64.whl is not a supported wheel on this platform.
I have python 2.7.14 as you can see from below:
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit
(AMD64)] on win32
Just in case, I tried updating pip and It said it was up to date. I also tried install this version of the .whl and I get the same error:
C:\Python27>py -2.7 -m pip install pyHook-1.5.1-cp27-cp27m-win32.whl
pyHook-1.5.1-cp27-cp27m-win32.whl is not a supported wheel on this platform.
From reading online I believe cp27 indicates its for python 2.7 and to be safe I tried the 64 bit and 32 bit files, but nothing seems to work. If anyone could offer up any solutions or advice, it would be greatly appreciated!
I installed Python 2.7, then pyHook and was able to get it working following these exact steps.
Note, I was using Anaconda to create the Python 2.7 environment and Windows 10 is my OS.
conda create -n python27 python=2.7 This created a new conda environment with python 2.7.14.
activate python27
python -m pip install --upgrade pip This installed pip version 10.0.0
Downloaded pyHook from the unofficial windows binaries.
Specifically: pyHook-1.5.1-cp27-cp27m-win_amd64.whl
Navigated to downloads folder in command prompt
pip install pyHook-1.5.1-cp27-cp27m-win_amd64.whl
That installed it properly with no error messages. Hope that helps. My guess is that the new pip version fixes it, or there is a problem with how you are installing Python 2.7, so try Anaconda (or miniconda if you want to keep it light)
I was also able to import it with no problem after these steps.
Many binaries depend on numpy-1.13+mkl and the Microsoft Visual C++ 2008 (x64, x86, and SP1 for CPython 2.7), Visual C++ 2010 (x64, x86, for CPython 3.4), or the Visual C++ 2017 (x64 or x86 for CPython 3.5, 3.6, and 3.7) redistributable packages.
Install numpy+mkl before other packages that depend on it.
I have Microsoft Visual C++ 2008.I just do this,
python -m pip install numpy-1.13.3+mkl-cp27-cp27m-win_amd64.whl
python -m pip install pyHook-1.5.1-cp27-cp27m-win_amd64.whl
then it work.

Python 3.5 - how to install lxml in Windows 7 64 bits

I am trying to install lxml with Python (32 bits) 3.5.1, on Windows 7 64 bits. I tried pip install lxml, but I got the famous error for missing "vcvarsall.bat". If I try to Install visual studio 2015, it requires 6 GB of free space, which I do not have available at the moment, and I'd rather not install a package which I do not plan to use.
I tried downloaded the wheel as suggested here and here, but I still get the whl file "is not a supported wheel on this platform". Wheel and pip are upgraded to the latest versions. What am I missing...?
I have been struggling with this today. I found, elsewhere on stackoverflow.com, this two-part and quick solution, which resulted in python no longer complaining when I tried to use lxml:
go to this repository and download a version which matches your Python installation (the version number, and 32- vs 64-bit. I use Python 3.5.1 64-bit, installed on Windows 10, so on that page, I chose lxml-3.6.0-cp35-cp35m-win_amd64.whl. You say you use the 32-bit version, so use a version that matches that.
My download directory is d:\Downloads. Python must be in your PATH environment variable for the next step to work. Use a command like the following, changing "D:\Downloads" to the pathname to your download directory. Then, at a DOS prompt, type:
python -m pip install "D:\Downloads\lxml-3.6.0-cp35-cp35m-win_amd64.whl" lxml-3.6.0-cp35-cp35m-win_amd64.whl

Python error when installing package using wheel files

I am trying to install pyHook with a wheel file (.whl) but for some reason it keeps giving me this error:
pyHook-1.5.1-cp34-none-win_amd64.whl is not a supported wheel on this platform.
I got the wheel file from this website:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
The command I use is:
pip install pyHook-1.5.1-cp34-none-win_amd64.whl
I have no idea what to do, I cant find any suggestions.
Python version 2.7
pip version 6.0.6
You are installing a Wheel created for Python 3.4, into Python 2.7. That won't work. Use the correct version and download the one with cp27 in the name:
pyHook‑1.5.1‑cp27‑none‑win_amd64.whl
I ran into the same issues whilst trying to install pyhook on Python 3.4. I downloaded the correct version from python software foundation.
I had to manually change the name of the file from pyHook_3k_compiled-1.5.1-cp34-cp34m-win_amd64.whl to pyHook-1.5.1-cp34-none-win_amd64.whl.
pip install pyHook-1.5.1-cp34-none-win_amd64.whl
And it worked!
You may not have installed the correct one for your operating system check whether it is the 32 bit or 64 bit variant and install it again

Categories

Resources