I'm trying to install Kivy on Python 3.4 using the instructions here: https://kivy.org/docs/installation/installation-windows.html
I'm on the installing dependencies step, where it gives me this error: http://prntscr.com/a5rk5k
Initially I tried just going ahead to the last step (python -m pip install kivy) and it looked like it worked fine, but then I tried import kivy in a Visual Studio project and it said "Unable to resolve "kivy""
Any ideas anyone? Keep in mind, I had Python 3.5 installed (which kivy does not work with) before now and set to default, but I changed the path in the command prompt.
Something is not right with your kivy installation, use python -m pip list to check what packages are missing and (re)install them, one-by-one would be the best for debugging. And also you've pasted it wrong, so the kivy.deps.gstreamer was read as a separate comand and not a package for pip
For simple installing of kivy just follow the install docs or if you don't mind having another folder or reinstalling python for new kivy&python try KivyInstaller which hopefully makes the whole process beginnerproof. You enter what you need in the beginning and then wait.
Related
I have many different versions of Python, but a version that I use and that terminal show me if use command Python – version is 3.10.0.
When I use command pip list I got a big list of library, including the one I recently installed odfpy.
I open VsCode, choose Python version 3.10.0 and try to import odf but...
ModuleNotFoundError: No module named 'odf'
For sure I need to set something on VsCode or change some configuration in Linux but I cannot find a normal explanation of how to solve this issue.
If I change the Python version in VsCode with 3.8.10, odfpy (and also Django just installed) is recognized. So I suppose that, even if the Python version selected on the terminal is 3.10.0, when I pip install something, is installed on version 3.8.10. How do you manage this?
Please check which pip you are using through the command of pip --version.
After you switch the python interpreter in the VSCode, please create a new terminal, and make sure it has activated the environment you have selected.
I also use VS code and use Python 3.10 and i had try to download the odfpy which has gone alright, i use the command python -m pip install odfpy
try and see if it work for you though.
If it does not work, maybe try and create a virtual environment if you haven't created it yet.
In my case i was getting same error while using import-export django module. Installing odf library didn't worked got same error. I resolve this issue by simply pip install tablib==0.14.0.
I am installing python on windows10 and trying to install the opencv and numpy extentions in the command window. I get no error installing them and it says it is successfully installed. But when I try to check the installation and import cv2 it does not recognize it and give me the error: no module named cv2.
can anybody help me with this problem? Is there something wrong in installation process or do I need to install something else?
I checked the newest version of each and used the compatible one with my system.
Thanks.
One solution could be that you have 2 versions of python. So, go to the specific python's scripts directory and run: pip install numpy
If that too doesn't work, you can find the answers to this question on Why can't I import opencv3 even though the package is installed?, as stated by #Cut7er.
I have tried the solutions given to the above stated question myself also. But, they didn't work for me. So, another thing that you could try to use is this IDE called PyCharm. It ofcourse is much more beautiful that the IDLE, but it also has an inbuilt GUI controlled installation of binaries or packages. That would make things a lot easier. I have faced a lot of issues with packages for python and this IDE made things a lot easier. You can find it on https://www.jetbrains.com/pycharm/download/#section=windows.
You can also use anaconda. But, I found it a little difficult to use since, it has similar issues.
EDIT:
Seems like you are using PyCharm. But, you are installing libraries from your command prompt. So, see the answer to: ImportError: No module named 'bottle' - PyCharm. This answer guides you through how to install a certain library through your PyCharm window itself. So,
1) Go to Files>Settings
2) Search for "Interpreter" from the searching tab. Open the interpreter
3) You can now see a plus sign on the right. A click on it will open up a section on the left.
4) In the searching tab, search for numpy or opencv. Click on whichever module you want to install. And then click on the "install package" button on the bottom left. This will install the package for you.
5) Then click save. And run your file that says import cv/cv2.
This should probably do the trick.
Hope it helps!
Is it possible that you have 2 versions of python on your machine and your native pip is pointing to the other one? (e.g. you pip install opencv which installs opencv for python 2, but you are using python 3). If this is so, then use pip3 install opencv
I removed the Anaconda version on my machine, so I just have python 3.7 installed. I removed the python interpreter(Pycharm) and installed it again and the problem got fixed somehow!
I suspect you have two versions of python and the one you're using doesn't have opencv on it, because pip pointed to the wrong one.
A pragmatic solution assuming you're using the python version with conda is to just use conda to install cv2:
conda install -c menpo opencv
A more careful solution is to figure out how to get the pip that points to the python version you're using. On linux I can check that my pip points to my python like this:
:~$ which python
/home/kpierce/anaconda3/bin/python
:~$ which pip
/home/kpierce/anaconda3/bin/pip
So you see the pip and python versions are associated. On windows I suspect you do an analogous thing on the command line like
where python
where pip
And if they don't match, you might try
where python
where pip3
to see if those match. You need to use the pip that points to the correct python version. You can view the python version by entering the python interpreter and running
import sys
sys.version
I've been following sentdex's python beginner series. I was doing well enough until I had to path python so I could use pip. I did that, and tried installing a few whl files, cx_Freeze and PIL.
It said everything was installed correctly and they're in libs/site packages but whenever I try to draw from them I get an error saying
ModuleNotFoundError: No module named 'cx_Freeze' (or PIL or whatnot).
Am I getting the wrong version?
EDIT: So I thought the problem was that the python shell was in a different location than the rest of my python install, which is not the case, I just only saw part of the path. I re-ran the script in the command prompt version of python.exe and I got no errors. What the hell is going on
you probably run a different python or pip then the one you expect. It happens with me often. To avoid such an issue use:
python -m pip install Pillow
python -c "from PIL import Image; print(Image)"
by calling the same python executable you avoid problems using a pip that belongs to a different python install.
You can also use:
python `which pip` install Pillow
I've been having a ton of issues in general trying to install packages on python 3 on windows. I don't know if any issues are related or not, I'm just going to try to provide as much detail to these issues as I can.
It's not just PYQT, but a couple packages are giving me issues with installing. I have a python 3.5.1 virtual environment, and when I try to install PYQT4 it gives me the error (using pip, pip3, with and without --pre):
Could not find a version that satisfies the requirement pyqt4 (from versions: )
No matching distribution found for pyqt4
This isn't the only package that has given me this exact same error, but I can't recall atm what other packages gave me issues. (Another issue I often get with other packages is error: Unable to find vcvarsall.bat. I've been through all the questions regarding that error, installing visual c fails for me).
So I decided to try to download the zip and follow this guide: http://pyqt.sourceforge.net/Docs/PyQt4/installation.html , which has me following this guide to install SIP as a requirement: http://pyqt.sourceforge.net/Docs/sip4/installation.html#downloading .
So now I'm having more problems. Part of the installation process for SIP requires using a makefile. So I downloaded make from cygwin. I run python configure.py to generate the makefile (in the proper virtualenv), and I run make, but make never ends. It keeps reading this over and over again until I kill powershell or cmd:
cd sipgen
/usr/bin/make
make[453]: Entering directory '/cygdrive/c/Users/<username>/.virtualenvs/<envname>/sip-4.17'
That directory is the location of the makefile. I'm completely inexperienced with make, so any help would be appreciated. All of these problems are while using Python 3. My python 2 virtual environments are able to install most packages fine.
Edit: My mistake, in this case it's giving the same pip error with python 2 and 3.
Where can I download _winreg for python3 if I can at all. I have my 'windir' on E:\Windows. I do not know if cx_Freeze did not notice that. I am using cx_Freeze to create an msi installer.
As it says in the _winreg documentation, it has been renamed to winreg in Python 3.0. You should run the 2to3 tool if you're converting code that was written for Python 2.x.
I know this is an old question, but this was the first search result when Googling for ModuleNotFoundError: No module named '_winreg', and perhaps may be helpful for someone.
I got the same error when trying to use a virtual environment folder, which has been created using different (already deleted) python binaries. The solution was recreate the virtual environment:
Delete the virtual environment folder
Run python -m venv <name_of_virtual_environment>
I have found an easy solution for this, Even though i found it after a lot of Rnd, the solution implementation is so simple and straight forward. Hope it can help many people with the same problem.
If you dont have the latest version of Python installed on your machine, You need to download it from (https://www.python.org/downloads/) and then click on Add to path option and just finish the installer.
Please open CMD and move to the python latest version directory, then run the pip install package name (e.g) pip install pygame and it will be successful
1. C:\WINDOWS\system32>cd C:\Users\admin\AppData\Local\Programs\Python\Python37-32
2. C:\Users\admin\AppData\Local\Programs\Python\Python37-32>pip install Pygame
It will install the packages now without any issues.
Downloading
Successfully installed Pygame-1.9.4
C:\Users\admin\AppData\Local\Programs\Python\Python37-32>
If you are still facing issues in Pycharm after trying the above solution, please try the following steps too.
Create new virtual Environment from settings menu and select the latest version of python framework as Project Interpreter and give a new folder path.
select the pip package you want to import. Recompile the code and the error will clear.
Hope this helps.
When you encounter an error like module of simpleai not found,
use
pip install simpleai
in the prompt and then execute. It will get installed.