I ran into this issue while trying to install the regex package. pip seems to be installing the 32 bit wheel instead of the 64 bit one.
This is weird, especially since I only have 64-bit python. I'm running python 3.9.5, pip 21.1.2 on windows 10
Related
Does pip install always build extension modules with the same compiler that was used to compile the current Python version?
For example, this blog post explained that numpy package uses C code, which has to be compiled against the same compiler as the Python itself:
Python 2.7.13 (default, Aug 21 2017, 11:46:40) [MSC v.1900 64 bit (AMD64)] on win32
tells us which compiler was used. numpy and other packages have to be compiled against that identical version.
pip install never installs a compiler. You have to have the compiler before running pip install.
See https://wiki.python.org/moin/WindowsCompilers to learn what version of VC you need to install for different versions of Python.
It would be much simpler to install a precompiled wheel. Said numpy has a lot of precompiled wheels. Currently there are binary wheels for Python 2.7, 3.5, 3.6 and 3.7 on MacOS 64 bits, Linux 32 and 64 bits, Windows 32 and 64 bits. Just type pip install numpy and your pip automatically determines what platform it's being ran on and download and install the proper wheel.
Yes! Originally pip was built on top of distutils package which by default enforces extension modules to be compiled with the same compiler as an interpreter itself. Currently it mostly installs packages from pre-built wheels (which in turn are also built with help of distutils) and packages still have to use setuptools to be able to build extension modules.
On Windows compiler version is also enforced to be the same (or, since Python 3.5, compatible). On Unix-likes the compiler and linker flags used to compile Python will also be used to compile extensions.
Note that this is more of a convenience and safeguard rather than a requirement. Except for some special cases Python extensions should work just fine when built with another compiler version.
Pip prioritises the version on your PATH. Pip3 and Pip are used to differentiate between the two versions.
https://docs.python.org/2/installing/index.html
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.
I tried installing numpy 1.11.2 on my windows 10 64 bit pc. but I have problem importing it in python(version 2.7 64 bit), what steps should i follow. and if a wheel has to be installed then which verison and how do i install it please?
You can use the Anaconda distribution which comes with many scientific packages preinstalled from here
I am sure you tried pip install numpy , an alternative would be to download numpy wheel from here http://www.lfd.uci.edu/~gohlke/pythonlibs/ and do pip install wheel.
I was having a similar problem installing Numpy for python 2.7. Here is what I ended up doing:
py -2 -mpip install numpy
This tells all intrested parties that you really want to install Numpy on python 2.7. It will warn you that you need to upgrade as python 2.7 has come to its end of life.
Is there a pip install for py2exe 64 bit that is for the 64 bit python 2.7? The 32 bit py2exe doesn't work for me, but I keep getting exceptions when I try to install the 64 bit version. I downloaded the 64 bit py2exe for python 2.7 from this site: http://www.lfd.uci.edu/~gohlke/pythonlibs/#py2exe but can't install it
The error I am getting using python -m pip install py2exe:
Runtime Error: This package requires Python 3.3 or later
Command "python setup.py egg_info" failed with error code 1
Note: The following works for the 32 bit but I need the 64 bit
pip install http://sourceforge.net/projects/py2exe/files/latest/download?source=files
I am running 64 bit python 2.7 and am trying to install 64 bit py2exe
Any easy pip install for it?
I have found an easy way to install py2exe 64 Bits in Windows 7 or greater.
Go to Official Download Webpage
Download your version: py2exe-0.6.9.win64-py2.7.amd64.exe (There are other versions: py2exe-0.6.9.win64-py2.5.amd64.msi and py2exe-0.6.9.win64-py2.6.amd64.exe)
Run the installation
And enjoy!
Hope this help you like did to me.
I'm working with Django for python.
I've tried to install Markdown 2.0.3 for python from here http://pypi.python.org/pypi/Markdown but it only has a windows 32 bit version and I have windows 7 64 bit.
When trying to install the 32 bit version an error appears:
No python installation found in the registry
I do have python 2.7 that works perfectly with Django.
Do you have any suggestions?
There is no 64 or 32 bit version of this module. Markdown is a pure-python module and you can install it that way. If the .exe doesn't work for you for some reason, you can always download the .zip version, unpack and run python setup.py install in that directory (provided that python is in your PATH)