Unable to install Pyhook Python 3.8.1 - python

I'm trying to install Pyhook on Python 3.8.1via pip install Pyhook but I keep receiving this error message:
ERROR: Could not find a version that satisfies the requirement pyhook (from versions: none)
ERROR: No matching distribution found for pyhook.
I also tried to download it from source and then to install it manually.
pip install C:\Users\Andrea\Downloads\pyHook-1.5.1-cp37-cp37m-win_amd64.whl
ERROR: pyHook-1.5.1-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.
Maybe it's not compatible with Python3.8 since the last versione is cp37.
Could I install it in any way? Or I just need to use Python 3.7?

You can try doing the below steps:
Download the py hook module that matches your version of python from here. Make sure that if you have python 32 bit you download the 32 bit module (even if you have windows 64x) and vice versa.
Open your command prompt and navigate to the folder where you downloaded the module
Type pip install and then the name of the file.
Ex: pip install pyHook-1.5.1-cp27-none-win32.whl
Reference for the solution here

The file pyHook-1.5.1-cp37-cp37m-win_amd64.whl which you have downloaded is only compatible with cp37, i.e. python 3.7, since you are using 3.8, this will not work.
Checking this site of whl file, there are also none for python 3.7, but there is a fork of pyhook called PyWinHook, for which the fitting whl is available
Note that you can always run in your cmd python -c "import wheel.pep425tags as w; print(w.get_supported())" to find which version of whl files are supported

Just check if python 3.7 is already installed in your system. If yes, then you can use it to install the 3.7 whl using the below command
py -3.7 -m pip install pyHook-1.5.1-cp37-cp37m-win_amd64.whl
you have to then launch the program from 3.7
py -3.7 program.py

Related

Trouble installing packages in Python - ... is in an unsupported or invalid wheel

Hi I am trying to install win10toast and I get this message:
I had this error when I tried to download pywin32 previously, but why is this error popping up whenever I try to install any other package? I used to be able to install packages fine before with the same command
pywin32 is listed as a requirement for the package win10toast (link). So, when you are installing win10toast, pip also tries to install pywin32 which gives you an error.
From the looks of it, you are using a python 3.6 and a 32-bit system, both of which are supported by the latest release (pywin32 302). To resolve the pywin32 error, you could try the following.
Option 1: Considering there are multiple installs and python3 is mapped to python 3.6 installation. (You can check that using python --version)
Install using python -m pip install pypiwin32
If you had a prior successful install on pypiwin32, you could actually try to use: python Scripts/pywin32_postinstall.py -install
Option 2: Download the binary files and install - https://github.com/mhammond/pywin32/releases/tag/b302
Download the appropriate exe and install
Option 3: Download the source files and build:
Download the zip file from: https://github.com/mhammond/pywin32/releases/tag/b302
Unzip the file
Use the command python setup.py install
Update:
I was looking around the pywin32 github repo and found that the same issue is encountered by others too. While an official update is not rolled out, you can try the solution there:
you need to download the wheel found here
Install the whl manually using the command: python -m pip install C:/some-dir/pywin32-302.1-cp36-cp36m-win32.whl

ERROR: You must give at least one requirement to install - CDSW

I am trying to install packages on my cdsw environment.
I have placed the packages in my cd /home/ folder
and I am running below command:
pip install --no-index --find-links=/home/cdsw/Package/scipy-1.7.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl
I get below error:
ERROR: You must give at least one requirement to install (maybe you meant "pip install /home/cdsw/Package/scipy-1.7.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl"?)
Linux version:
4.4
Python 2: Python 2.7.11
Python 3: Python 3.6.1
Java: openjdk version "1.8.0_211"
How do I resolve this problem.
Currently, you are only passing information to pip of where you want to find the package but not what package to install. find-links is used to pass a location of where your package will be located (and not the package).
To successfully installl you can use:
pip install --no-index /home/cdsw/Package/scipy-1.7.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl
Edit 1:
Based on your comments, you also do not have the whl downloaded. So, you can also simply install scipy using the command:
pip install scipy
or can download a specific whl file from scipy's github
Edit 2:
Since you still are running into the error, and have 2 python versions installed, the pip command might be associated with python2.7. In that case, it is likely that python3 is the command associated to the python3 installation and python is the command associated to the python2 installation. Using the command in the format below will install scipy correctly.
python3 -m pip install --no-index /home/cdsw/Package/scipy-1.7.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl
Edit 3:
You have python 3.6.1 installed on your machine, which is not supported by scipy v1.7.1. You have 2 options to fix this issue:
Upgrade to a newer version of python
Install a version of scipy which has python 3.6 support. I looked into the same and found v1.5.4 as the last version with support for python 3.6 support. You can download the whl for the same here.
Make sure you are downloading the file containing a file with cp36 in it, since those will be the files compatible with python 3.6

Can't install lxml for python 3.8.1 on windows

I am on Windows 10 64-bit, in a venv.
Pip install lxml return
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
So I tried to use the appropriate .whl availlable here (lxml-4.5.0-cp38-cp38-win_amd64.whl) which leads to another error:
lxml-4.5.0-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.
I tried to use pip.exe, pip3.exe, pip3.8.exe and the 64x and 32x bit versions of the .whl file without success
Am I missing something or is the Python 3.8 version of the package not compatible with Python 3.8.1?
This happens because you probably have an older version of python alongside 3.8 and when you install the package it references the older one. You can try deleting all python versions and installing Python 3.8 again
I used deactivate to get out of venv mode, then it worked.
Use "pip3 install lxml" and you will get it installed. Make sure you have updated pip3 version. You can install it by "easy_install -U pip3". Let me know in case of issues.

ERROR: pyHook-1.5.1-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform

I am trying to make a keylogger in Python that requires pyHook module. I tried pip install pyHook but it did not work.
So, I downloaded this package from https://www.lfd.uci.edu/ -
pyHook-1.5.1-cp37-cp37m-win_amd64.whl
Then I tried to install it using:
pip install pyHook-1.5.1-cp37-cp37m-win_amd64.whl
But is shows the error given in heading.
I even downloaded this package from same site - pyHook‑1.5.1‑cp37‑cp37m‑win32.whl
But none of them works. So what should I do? Please help.
My system is 64-bit and I use Python 3.8.
That happens because you are using python 3.8, and you need to install python 3.7 to run the pyhook library.
Try to uninstall your version 38 then install python 3.74, and finally run your command
pip install pyHook-1.5.1-cp**37**-cp**37**m-win_amd64.whl

I can't install opencv for python on Windows after trying out almost everything

These are the things I tried but nothing seems to work yet
pip install opencv-python
OR
python -m pip install opencv-python
gives an error
ERROR: Could not find a version that satisfies the requirement opencv-python (from versions: none)
ERROR: No matching distribution found for opencv-python
I downloaded the opencv windows package from the site and copied the PYD file into python's site-packages
but still cv2 cannot be imported
import cv2
gives an error as
DLL load failed while importing cv2: %1 is not a valid Win32 application.
Then I downloaded the opecv-control WHL file for python3.8/32bit (as my python is 32 bit) unofficial Binaries for python extension packages
and followed the step but still nothing happened
I am a beginner in this.
OpenCV hasn't been built for 3.8 yet according to the docs 3.7 is the highest version
https://pypi.org/project/opencv-python/
try downgrading your python to 3.7 or below. It would work.
Is pip up to date? You can run python -m pip install --upgrade pip to check.
It should work after that.
Please try the following:
import imp
imp.find_module("cv2")
Python Package Link
In the above link search opencv_python‑4.1.2‑cp36‑cp36m‑win_amd64.whl for python 3.6
64 bit and download that wheel file.
Install procedures:
Go to the site-package path in the python36
C:\Program Files\Python36\Lib\site-packages>
Then put the command pip install . Example,
C:\Program Files\Python36\Lib\site-packages>pip install F:\urllib3-1.25.7-py2.py3-none-any.whl
After this procedure import and check in IDLE.
If any doubt ping this. Good luck

Categories