I am new to python, and am trying to install some modules/packages using .whl file. The system does not have access to the internet so everything is local.
I'm running RHEL 6.9 64bit 2.6.32-696.10.1.el6.x86_64
Python is version 2.7.12 (altinstalled with 2.6)
platform.architecture()
('64bit', 'ELF')
I'm running pip 9.0.1
Attempt at installing numpy:
# /usr/local/bin/pip2.7 install numpy-1.13.3-cp27-cp27m-manylinux1_x86_64.whl
numpy-1.13.3-cp27-cp27m-manylinux1_x86_64.whl is not a supported wheel on this platform.
So what am I missing?
cp27-cp27m manylinux packages are compatible with a Python interpreter compiled with --enable-unicode=ucs2.
For an interpreter compiled with --enable-unicode=ucs4, you instead need cp27-cp27mu packages.
Related
I'm trying to build Tensorflow from source (if I install directly it works fine but I'm trying to get AVX2/FMA extensions support as I can't use CUDA/GPU) and I'm following this tutorial to build Tensorflow 1.15 (which is needed for the project that I use, I can't use 2.x).
I've built Tensorflow successfully, but when I try to install the wheel with pip I get the following error:
ERROR: tensorflow-1.15.5-cp37-cp37m-macosx_11_0_x86_64.whl is not a supported wheel on this platform.
Well, I know what the error means but the problem is that:
The wheel, as implied by the filename, is built for:
Python 3.7
macOS 11.0
x86/64
Which is already what I have (yup, double checked Python version, it's exactly Python 3.7.9, and no I'm not on M1 if that matters, I'm on Intel Mac). Why am I getting this error message even though I'm on the platform that the wheel is built for?
UPDATE: I'm already on the latest pip as of writing, and I can verify pip and python point to the same version:
(tf) can#can-mbp tensorflow % which pip
/opt/anaconda3/envs/tf/bin/pip
(tf) can#can-mbp tensorflow % which python
/opt/anaconda3/envs/tf/bin/python
(tf) can#can-mbp tensorflow % pip -V
pip 21.0 from /opt/anaconda3/envs/tf/lib/python3.7/site-packages/pip (python 3.7)
(tf) can#can-mbp tensorflow % python -V
Python 3.7.9
FOR MACOS - BIG SUR
I was able to solve this problem when I found that the version of the macOS operating system does not match the version actually recognized by python
I'm using macOS 11.4, the file is with this version. But when typing a command in the terminal, I found that python recognizes 11.0.
python3
from distutils import util
util.get_platform()
>> 'macosx-11.0-arm64'
generated file name:
opencv_python-4.5.2+2344814-cp39-cp39-macosx_11_4_arm64.whl
new file name:
opencv_python-4.5.2+2344814-cp39-cp39-macosx_11_0_arm64.whl
Upon #Axe319's comment I took a look at https://github.com/apple/tensorflow_macos/issues/46 and seen that simply changing the wheel's filename's OS section to 10_9 works. There is probably a bug with parsing macOS 11.0 or Python doesn't think it supports 11.0 (maybe that particular Python/pip version was before Big Sur was released).
Make sure the Python version you are using (32/64 bit) does match what the wheel requires ;)
I have python 3.7.5 and Python 3.8 installed on the same windows 10 machine. They were both installed from python.org/downloads. When I run pip install coverage (using the latest release of pip) it installs coverage with c extensions under 3.7.5 and without c extensions under 3.8.2.
How can I force coverage to install with c extensions, as the performance is terrible without them?
It appears 3.7.5 downloads:
https://files.pythonhosted.org/packages/4b/c7/6b1af1c8806fa047469b19861a3438f9ce785aa41c831c15d676ccaaa726/coverage-5.0.3-cp37-cp37m-win32.whl
where as 3.8.2 downloads:
coverage-5.0.3.tar.gz
The later being "without c extensions"
There are no valid coverage wheel for Windows and Python 3.8 at the moment.
The 5.0.3 wheels on PyPI are marked as compatible with cp38-cp38m-win_amd64, so CPython 3.8, with the cp38m ABI variant, for 64-bit Windows.
But, there is no such ABI variant any more. Python 3.8 no longer has a m (--with-pymalloc) binary variant, because builds with or without --with-pymalloc are now ABI compatible.
Pip has followed suit and stopped adding the m flag when looking for wheels, and the wheel project, which creates these distribution files also dropped the m flag.
However, coverage.py is using an older release of wheel to build the distributions, they are using 0.33.1, while the above changes landed in version 0.33.5. You already filed a bug report with the project, I've added my findings there too.
Luckily, the flag is superficial. You can download the wheel file directly from PyPI, rename the file (removing the m from cp38m) and then use pip install path/to/renamed/coverage-5.0.3-cp38-cp38m-win_amd64.whl.
Note: the same issue applies to the 3.9 wheels.
I am using OpenCv 3.4.0, Python 3.6.4, Cmake 3.10.2, OpenNI-Windows-x64-2.2, SensorKinect093-Bin-Win32-v5.1.2.1, Visual Studio 2015 and Windows 10. I want to build the cv2.pyd for Python 3.6.4.
I follow the step in many others way such as github and OpenCV install opencv_contrib on Windows
After configure in the Cmake, It shows the output about python 3 like this:
Python (for build): C:/Users/zhong/AppData/Local/Programs/Python/Python36-32/python.exe
And the Cmake havn't the BUILD_opencv_python3, PYTHON3_INCLUDE_DIR and PYTHON3_LIBRARY, so I append the Bool value of BUILD_opencv_python3 and the locations of PYTHON3_INCLUDE_DIR, PYTHON3_LIBRARY manually. The locations are as followings:
PYTHON3_EXECUTABLE C:/Users/zhong/AppData/Local/Programs/Python/Python36-32/python.exe
PYTHON3_INCLUDE_DIR C:/Users/zhong/AppData/Local/Programs/Python/Python36-32/include
PYTHON3_INCLUDE_DIR2
PYTHON3_LIBRARY C:/Users/zhong/AppData/Local/Programs/Python/Python36-32/libs/python36.lib
PYTHON3_LIBRARY_DEBUG
PYTHON3_NUMPY_INCLUDE_DIRS C:/Users/zhong/AppData/Local/Programs/Python/Python36-32/lib/site-packages/numpy/core/include
PYTHON3_PACKAGES_PATH C:/Users/zhong/AppData/Local/Programs/Python/Python36-32/Lib/site-packages
After that, Cmake can't find the Libraries of Python3, albeit it have the correct location of PYTHON3_LIBRARY. The output about Python3 in Cmake like this:
Python 3:
Interpreter: C:/Users/zhong/AppData/Local/Programs/Python/Python36-32/python.exe (ver 3.6.4)
Libraries: NO
numpy: C:/Users/zhong/AppData/Local/Programs/Python/Python36-32/lib/site-packages/numpy/core/include (ver 1.14.0)
packages path: C:/Users/zhong/AppData/Local/Programs/Python/Python36-32/Lib/site-packages
Python (for build): C:/Users/zhong/AppData/Local/Programs/Python/Python36-32/python.exe
How can I configure the python 3.6.4 with Cmake correctlly? I want to use deep camera so I have to compile the Opencv with OPENNI2.
I am looking for help how can I solve it? Thank you very much.
I give up the python 3, and install the python 2.7.14, OpenCV 3.2.0 instead.
Following the step in OpenCV install opencv_contrib on Windows is easy to install...
It take me too much time to install, I suppose that OpenCV 3.4.0 do not support for Python 3.6.4.
I just found this site which contains instructions:
https://www.scivision.co/install-opencv-python-windows/
I was able to use the "pip install opencv-contrib-python" command to have it auto downloaded and installed. I am using Python 3.7 (but it should also work for the version you listed) and have an anaconda environment activated. If you use anaconda, just make sure you install pip for the environment you are using and activate it before using the pip install command.
I am new in computer vision.
I am trying to install the opencv library 3.2 with python 3.6 but I followed every tutorial.
However; I don't know what I've done wrong. I have installed python 3.6 amd 64 and added it to the PATH ... then I have downloaded the wheel of opencv 3.2 for python 3.6 amd 64 then try to install it using pip.
However, it says that isn't supported in this platform. So, I don't know what to do now. I'm trying to avoid the CMake ... stuff because I find it tough!!!
The error mentioned in the prompt
Pip checks whether name of a wheel contains platform specific words Eg.
ad3‑2.0.2‑cp27‑cp27m‑win32.whl
(python 2.7, windows 32-bit/x86) if I install it on python 3.6 it say it isn't supported on this platform but if I change wheel's name it trys to install it. Chceck which pip are you really using. You can't use x64 wheels on x86 interpreter. Some unofficial wheels for windows platform you can find here: http://www.lfd.uci.edu/~gohlke/pythonlibs/
Is there an M2Crypto Windows installer for Python 2.7 64-bit? If not is there a reason why one cannot be built?
M2Crypto-0.21.1.win-amd64-py2.7 is available as part of the ActivePython Business Edition. M2Crypto is easy to build from the source distribution using Visual Studio 2008 but there are legal reasons why the binaries cannot be freely distributed.
You can try my Windows 64 build for Python 2.7:
http://brabenec.net/misc/packages/M2Crypto-0.21.1.win-amd64-py2.7.exe
http://brabenec.net/misc/packages/M2Crypto-0.21.1-py2.7-win-amd64.egg
Install via pip: pip install M2CryptoWin64 (for 64-bit Win) or pip install M2CryptoWin32 (for 32-bit). See this blog
It needs to install openssl-1.0.1b to get rid of issue
ImportError: DLL load failed: The specified module could not be found.