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.
Related
With Poetry version: 1.1.13 I get the following error when trying to use Python 2.7.18 via Pyenv...
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
This occurs when 2.7.18 is set up locally (pyenv local 2.7.18) and globally (pyenv global 2.7.18). Running python within the directory in question launches the terminal...
Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 20 2020, 13:25:05) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
But when I install Python 3.9.6 and set it as the local Python version, Poetry works perfectly correctly!
Has anyone seen this before? Am I missing something?
%USERPROFILE%.poetry\bin\poetry.bat was calling Python3 which can't find Python2 installs. When installing Poetry get-poetry.py is called. The _which_python method (line 666) determines if the call in poetry.bat is Python3 or Python by which version of Python it finds during the install.
If you have already installed Poetry simply modify the poetry.bat file to be python. For future installations with Pyenv ensure that a 2.7 Python version is set as global.
I am trying to download a library called Albow. I tried using pip to install it, but it didn't work, so I went to the Albow website and it linked to a .zip file. Basically what I want to do is to make it so that when I type:
import albow
Python recognizes it.
I'm using Python 3.5.3, on a Debian Linux VM. My PC's OS is using ChromeOS.
If I missed something that I should explain, I will edit the question.
The Albow website you linked to (or this other one from the Pygame projects) only supports Python 2. It's not available in PyPi so pip install would not work.
Since you tagged this python3.5, I assume you want Python 3 support.
There is a ported version available from PyPi: https://pypi.org/project/python3-albow/.
This project is a port of Gregory Ewing's Albow project (https://www.pygame.org/project/338/4687) that is only compatible with Python 2 and is unsupported since 2014.
You should be able to install it using standard pip install
$ python3.5 -m pip install --user python3-albow
...
Installing collected packages: pygame, python3-albow
Successfully installed pygame-1.9.6 python3-albow-2.7.8
$ python3.5
Python 3.5.9 (default, Nov 24 2019, 01:35:13)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import albow
>>> albow.__path__
['/home/gino/.local/lib/python3.5/site-packages/albow']
>>>
Or, preferably, setup a virtual environment and install it there.
I have such a problem
(face_det) user#pc:~$ python3
Python 3.5.3 (default, Apr 22 2017, 00:00:00)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'cv2
I don't have it on python2:
(face_det) user#pc:~$ python2
Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:15)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import cv2
>>>
In spite of the fact, that I have opencv (I've also tryed to remove it and install then):
(face_det) user#pc:~$ pip3 install opencv
Requirement already satisfied: opencv in ./.virtualenvs/face_det/lib/python3.5/site-packages
(face_det) user#pc:~$ conda install opencv
Fetching package metadata .........
Solving package specifications: .
# All requested packages already installed.
# packages in environment at /home/pc/anaconda3:
#
opencv 3.2.0 np112py27_0 conda-forge
Try
pip3 install opencv-python
to get the cv2. I'm not sure when opencv-python became available. I'd been building opencv by hand, but when I looked a few weeks ago, there it was. I'm using cv2 with Python3 in a VM that's running ubuntu/trusty64.
Try
sudo python3.5 -m pip install opencv-python
It worked for me
On Windows you can try this:
python3 -m pip install opencv-python
Your conda openCV is installed for use by your home python2.7. Your opencv installed via pip3 is for use in your face_det virtual environment. It doesn't look like you're in that virtual environment when you opened python3 in the first code block. Try
source activate face_det
python3
import cv2
I think you're on Linux judging by pc:~$
Try installing from the following link:
http://docs.opencv.org/3.0-beta/doc/tutorials/introduction/linux_install/linux_install.html
It worked for me, hope the same for you!
I had a similar problem and the same error. In my case, I was using PyCharm. The problem was that the project's interpreter was pointing to a different installation of Python.
In my system, I had four versions of python (eg. python3 installed in a python36 folder, another python in an anaconda3 folder and others). In my PyCharm project, when I examined my settings (under File->Settings->Project:xxxx ->Project interpreter), I found that they were pointing to the interpreter in the anaconda3 folder.
However, my default pip installed the opencv-python module under the python36 folder. Therefore, I just had to change the project interpreter to point to the python installed in python36 folder and it worked.
If you would like to keep using Anaconda3 then you have to browse to the anaconda3 folder and run pip install opencv-python in that folder.
The title says it all. I do see similar questions, someone suggested about http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame, but all the pygame downloadable files are in .whl format which I have no idea how to run on Windows 7. I tried "cd [directory] > pip install [filename]" without success.
This worked from me (Windows 7, python 2.7, 64 bit):
pip install C:/Users/ujjwal.karn/Downloads/pygame-1.9.2a0-cp27-none-win_amd64.whl
I downloaded the file pygame-1.9.2a0-cp27-none-win_amd64.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame as well.
In general, whl files are installed with pip:
pip install whatever.whl
Open the .whl file through WinRar and just extract the contents(you will find 3 folders) into your Python folder.
For example : if you had installed python 2.7.3 in C:, then your directory to extract will be C:\Python27
You are doing right. Please just check python command it should display win64
C:>python
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (In
tel)] on win64 Type "help", "copyright", "credits" or "license" for more information.
if output is win32 install pygame‑1.9.2a0‑cp34‑none‑win32.whl
I'm trying to install a Python module on my Windows computer. I installed the development version of the NetBeans IDE to use as my Python editor, and it seems that they install Jython 2.5 under their own program folder, and force you to use that installation for development.
I've been trying to install the PyWhois module for half an hour now, and I'm getting pretty infuriated with the kludginess of developing Python on Windows with Netbeans.
Does anyone know how to install modules with this setup? Should I destroy my dev environment and use something else that would be less rage-inducing?
Jython is Python for Java - are you sure this is what you want? I have answered this for "normal" Python for Windows, I assume this is what you are after.
To use Python under Windows, you need to install the Windows binary installer, which you can download from the Python download page. Make sure you choose the binary installer.
Next, you will need to install setuptools, which you can get from the python package index (pypi).
Once you have installed both, you have Python available under Windows. You should be able to open a command prompt and type "python" to get the python prompt, it should look like this:
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
Then, to install PyWhois, open a command prompt and type:
C:\>easy_install pywhois
You'll see output like this:
Searching for pywhois
Reading http://pypi.python.org/simple/pywhois/
Best match: pywhois 0.1
Downloading http://pypi.python.org/packages/source/p/pywhois/pywhois-0.1.tar.gz#
md5=b888dcd990574b7b284d9a9f4b300776
Processing pywhois-0.1.tar.gz
Running pywhois-0.1\setup.py -q bdist_egg --dist-dir c:\docume~1\40843\locals~1\
temp\easy_install-hugnul\pywhois-0.1\egg-dist-tmp-aarhii
Adding pywhois 0.1 to easy-install.pth file
Installing pywhois-script.py script to C:\Python27\Scripts
Installing pywhois.exe script to C:\Python27\Scripts
Installing pywhois.exe.manifest script to C:\Python27\Scripts
Installed c:\python27\lib\site-packages\pywhois-0.1-py2.7.egg
Processing dependencies for pywhois
Finished processing dependencies for pywhois
To confirm it is installed, you should be able to import it from Python:
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pywhois
>>>
Netbeans 7.0 has removed Python support (see http://wiki.netbeans.org/Python70Roadmap) for more information.
This http://wiki.python.org/moin/IntegratedDevelopmentEnvironments wiki entry lists some other IDEs you can try.