Errors and problems while installing AutoPy - python

I want to install AutoPy for a particular python program.
but when i run pip install -U autopy then this error comes up :
https://drive.google.com/file/d/11vFBWXxNCnBptY3Qm_maP41yQ-lYFgAc/view?usp=sharing
I have Rust Nightly and the C++ compiler from Visual Studio.
Please help.
I use a Windows machine, Python 3.9, and I use Visual Studio Code as the Code Editor.
Thanks in Advance!

I figured it out, I needed AutoPy for Python 3.9, but AutoPy supports only till Python 3.8. Hence the error was occurring. Just install Python 3.8 and it sould work.
Python download - https://www.python.org/downloads/

Related

Setting up Python on Visual Studio Code on WIN10

I am trying to use openCV to do a small color detection from a camera. I followed and used this youtube code and downloaded openCV. I also downloaded the Python and Code Runner extension through Visual Studio Code.
I keep getting an error that python is not installed.
What am I doing wrong here as I am using the same code from the video found from his github
ERROR MESSAGE IN TERMINAL:
[Running] python -u "C:\Users\LINEA~1.LAP\AppData\Local\Temp\tempCodeRunnerFile.python"
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
[Done] exited with code=9009 in 2.123 seconds
https://github.com/CreepyD246/Simple-Color-Detection-with-Python-OpenCV
This error is occurring because while you have the Python extension for VSC installed, you don't have the Python interpreter installed, which is a separate piece of software. You can find the Python installer here. I recommend adding Python to PATH (an option it gives during the installation).
Once you've got Python installed, you'll still need to install Python bindings for OpenCV. This can be done from the terminal, by typing pip install opencv-python. If this doesn't work, try py -m pip install opencv-python.

I have issues installing wxpython

Can anyone help me out with installing wxpython
Please check attached wxpython installation error
the log is telling what you have to do. Have you try install Microsoft Visual C++ 9.0? No?
Your python version is 2.7?
If yes, so download and install Microsoft Visual C++ Compiler for Python 2.7 from the following link:
https://web.archive.org/web/20190720195601/http://www.microsoft.com/en-us/download/confirmation.aspx?id=44266

Error in installing face recognition module in python

I want to use the face recognition module of python in a project but when I am trying to install it using the command "pip install face_recognition" or "pip install face-recognition", it is showing an error and is not installing. This is the screenshot of the error:
How to fix this error and install the module?
Thanks in advance!
You should install a C++ compiler. I would suggest Visual Studio C++.
This is because the face_recognition package does not have prebuilt wheels for your platform and therefore you need to build them yourself when you install.
Anyhow just installing C++ build tolls will be sufficient.
Verify your installation
cl
And then re-run
pip install face_recognition
Face-recognition python module uses C++, so your computer needs somehow to compile the library it is using. Install any of the C++ compilers (for example minGW) & be sure is that compiler executable is added to your global PATH. After that try to install face-recognition library.
If the step above does not work - try using python 32-bit build (once I have encountered this error because my python build was 64-bit). It may help in some of the cases.
Use python version == 3.7 (any other versions does not compatible with face-recognition module)
Install dlib dependency and try to use conda for installing & manipulating environments.
P.S. you need to install C++ compiler, not Visual Studio itself. Visual studio is an IDE, while compiler is not.

Import "cv2" could not be resolved

I've installed python and opencv by using the correct commands in the cmd, but when I type in 'import cv2' in a python then I get the error in visual studio code and I can't find any solution online how to fix this
Import "cv2" could not be resolved Pylance (reportMissingImports)
More of the error in the terminal
ModuleNotFoundError: No module named 'cv2'
It just happened to me and I solved it installing both opencv-python and opencv-python-headless with pip and reloading the Visual Studio Code window right after it.
To install the needed packages, just run this command in the terminal:
$ pip install opencv-python opencv-python-headless
Make sure that its using the correct version of Python; e.g., I installed Python from the windows store, which is working:
However, if I use another one, it does not work:
I noticed that Visual Studio does not support the latest Python 3.8, so I had to use PyCharm as an IDE.
I had a similar issue so I installed opencv-python-headless (install opencv-python if not earlier) and reloaded the VScode window.
pip install opencv-python-headless
However, some methods like imshow() kept failing:
cv2.error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'
This was resolved by installing opencv-contrib-python. You can install it by running the following code in your terminal:
pip install opencv-contrib-python
In your terminal (cmd if Windows) run the following (make sure that you're on the current working environment):
pip install opencv-python
then:
pip install opencv-python-headless
I just uninstalled the older python version and installed a new one again. That is probably the simplest and the most hassle-free one in my mind. Stick to version 3.8.8, that should do the trick. Also no worries about maintaining multiple versions of python in the system. It is indeed true that the lack of support from VS is causing this issue.
I am on a mac and struggle with this and this is the best way to do it, when ur in your .py file, on the lower left part of your vscode windown u will see the version of python you are using, click that and try different versions until your open cv command works, in my case, 3.8.8 worked for me.

Unable to install Pybind11 package using Pip in Anaconda Command Prompt

I have Anaconda installed in my company laptop, for which I have no administrator rights. (Anaconda3 + Python 3.6.1)
I was trying to install pybind11 Python package using pip in Anaconda command prompt. But I encountered errors for the installation, even if I tried two different types of commands as shown in the screenshots below.
Can someone please help me? Thanks a Ton!
You should go to https://repo.anaconda.com/archive/ and try to install the correct anaconda software with python 3.5
The reason is python is essentially a growing language with tons of libraries and modules . Pyblind11 is not compatible with python versions 3.6.x or 3.7.x .

Categories