I have downloaded pygame:
C:\>pip3 install pygame --user
Requirement already satisfied: pygame in c:\users\mpenn\appdata\local\programs\python\python38-32\lib\site-packages (2.0.0.dev8)
And I have python 3.8.3:
C:\>py
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32
But when I try to import pygame in my "Wing Personal 7" IDE, I get the error:
builtins.ModuleNotFoundError: No module named 'pygame'
This has only started happening since I updated python to 3.8.3 yesterday.
make sure your python directory(the one where all the modules are stored) is added to the PATH variable. There are already many tutorials to do so:
How do I add Python to the Windows PATH
or if that doesn't work for you, google is your best friend.
In Wing, you need to change python executable to the python version you are using. python executable is found in Project, Project Properties...
Make sure that pip is up to date. Try running:
pip3 install --upgrade pip
Related
I have a problem and after searching without any solutions its time for my first question on this forum.
About a month ago i downloaded openCV (opencv-4.5.5-vc14...exe) and installed it.
After about a month i now wanted to try some other trackers and therefore i need contrib.
So, i deleted the openCV directory. (this could have been stupid but i did).
When i install opencv-python-contrib (following instructions on github/opencv/opencv-python)
d:\OpenCV>pip install opencv-contrib-python
Collecting opencv-contrib-python
Using cached opencv_contrib_python-4.5.5.62-cp36-abi3-win_amd64.whl (42.2 MB)
Requirement already satisfied: numpy>=1.17.3 in c:\users\martin\appdata\roaming\python\python39\site-packages (from opencv-contrib-python) (1.22.2)
Installing collected packages: opencv-contrib-python
Successfully installed opencv-contrib-python-4.5.5.62
d:\OpenCV>python
Python 3.9.10 (tags/v3.9.10:f2f3f53, Jan 17 2022, 15:14:21) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> print (cv2.__version__)
4.5.5
>>>
i get 4.5.5 (and no contrib add on).
I have updated pip and i have tried removing the version of python that i used in my earlier install.
I have checked path in environmental setting removing everything about opencv
What is it i´m missing?
When i uninstall (pip uninstall opencv-contrib-python) and try to import cv2 there is an error and files i have built in VS turns crazy.
When i reboot my computer and install (pip install opencv-contrib-python) we are happy campers again (besides contrib not working). as from the installation contrib is successfully installed but when i try a contrib command it does not work and the cv2.version says its not there.
Edit = When i open Visual studio/environment i have the opencv-contrib-python (4.5.5.62).
In my python/site-package i have a opencv_contrib_python-4.5.5.62.dist-info directory containning;
installer
license
license-3rd-party
metadata
record
request
top_level
wheel
Could anyone check their directory and see if they have the same so that i know that everything got installed?
I also have a cv2 map containing (amongst other files and directoris) cv2.pyd
Is there a PATH i need to fix?
Does anyone have any ideas?
Is there some information that i should provide?
I´m open to all suggestions, high and low ;)
i can use opencv in VS without any problems, its just the contrib that is missing.
sorry for my English, i´m a swede and English is far from something i brag about on my resume.
Best,
Martin
Well now its working. I could not really say how, but it does so; problem solved..
I've tried to install the module bpy (blenderpy) to be able to run python-scripts for Blender directly from Spyder IDE with Python 3.8.5. However, I can't seem to find a good solution for this.
I've tried to follow this wiki on Github to use a build provided for bpy version 2.82. I installed every required program and tried to install bpy with !pip install bpy --no-binary :all: in the Spyder-console, like it was suggested in the wiki. Unfortunately, bpy version 2.82 is not compatible with Windows Python 3.8.5:
in build_cmake
raise Exception(f"{VERSION} bpy is not compatible with "
Exception: 2.82 bpy is not compatible with Windows Python 3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)] 64bit [...]
Otherwise the installation of bpy would probably have worked.
My question is now: Is there a more recent build for bpy which can be installed with pip and is compatible with (Anaconda) Spyder python 3.8.5? If not, which Anaconda-distribution of Python do I need to install in order to be compatible with bpy 2.82? How could you manually add modules (like bpy) to your Spyder IDE that aren't available in the Anaconda-Distribution of Python and can't be installed via anaconda.org?
I am trying to install pygame. But I am not sure which version is appropriate for me.
I am working on a Windows 10 AMD64 PC.
The version of Python that is installed, shows-
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 19:29:22) [MSC v.1916 32 bit (Intel)] on win32
on typing python into the command prompt.
I can find the packages here and here.
But there are only items listed such as-
Download repository
pygame-1.9.2-cp27-cp27m-win32.whl
pygame-1.9.2-cp34-cp34m-win32.whl
pygame-1.9.2-cp35-cp35m-win32.whl
pygame-1.9.2-cp27-cp27m-win_amd64.whl
pygame-1.9.2-cp34-cp34m-win_amd64.whl
pygame-1.9.2-cp35-cp35m-win_amd64.whl
Now I have no idea which one of these is to get.
And, what are the differences among cp27, cp34 and cp35?
Please help me choose my version.
normally you should just type following command
py -m pip install pygame
On non windows system you just type
pip install pygame
and the correct file will be downloaded and installed.
The pip module will consult https://pypi.org to indentify the versions available and choses normally the right one
I'm trying to get TensorFlow to work on my Win7x64 following this guide:
https://www.tensorflow.org/install/pip
Everything has gone well until 3. Install the TensorFlow pip package
When i do "python" to see the version i get the following:
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)] on win32
When i do "pip install tensorflow" i get:
Could not find a version that satisfies the requirement of tensorflow (from versions: )
No matching distribution found for tensorflow
If i try "python -m pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.2.1-cp35-cp35m-win_amd64.whl" i get this:
tensorflow-1.2.1-cp55-cp35m-win_amd64.whl is not a supported wheel on this platform.
Please help me understand what am i doing wrong or why is it not working? How to get it to work? Thank you very much!
You have an unsupported version of Python. Tensorflow currently only supports Python 3.6 and below, not 3.7 and even if you do manage to install it you will run into issues as Python 3.7 made async a keyword and many libraries, like Tensorflow, use this for variable names. In order to make this work on your system you need to downgrade to 3.6, there is actually a thread with troubleshooting steps on this issue on GitHub: https://github.com/tensorflow/tensorflow/issues/17022
I installed the PyAutoGUI package using pip install pyautogui.
I can tell it's installed since I can import it using the PyCharm terminal:
Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900
64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyautogui
>>> print(pyautogui)
<module 'pyautogui' from 'C:\\python\\anaconda3\\lib\\site packages\\pyautogui\\__init__.py'>
>>>
My problem is: When I try to add it to my project virtual environment, I can't find it on the available packages. Is there any way to add it manualy ?
P.S.: This is how I'm trying to add it:
File>Settings>Project>Project interpreter>install(the green plus button)>available packages>install
Since you cannot find PyAutoGUI on available packages (for me it is there), you can try running
pip install pyautogui
in the pycharm terminal. If you have already installed it in the global site-packages, pip will use the cached files in installation instead of downloading it again.
I work around this problem by uninstalling anaconda python and pycharm then reintalling pycharm and python (not anaconda), now i can add modules to my venvs no problem.
Note: at first, the available packages list was empty until i added "https://pypi.python.org/" to my repositories using the manage repositories button.