I have been attempting to install the Pillow (PIL) module into my python(3.8.2) using Windows 10 to no success.
I have tried executing pip install Pillow as mentioned by the website in my cmd but both pip and python are 'not recognised as an internal or external command, operable program or batch file'
What I have tried:
Reinstalled both pip and python and tried again, with the same problem.
Using powershell instead of command prompt (not sure if that makes any difference).
Also I understand you can download the Pillow module package in .whl, but I couldn't work out how to install it that way.
I have also installed pygame using the cmd before which baffles me as to why this is happening.
Any and all help is appreciated, Thank you!
If you're sure that you've successfully installed python, but it's not working on your commandline, it may not be in your PATH. Open the search in the windows start menu, and type "env" and click on "Edit Environmental Variables for your system (or choose account if you don't have admin on the system). If you chose system, click on the environmental variables button. You will then be greeted by one window split into two menus, User Variables and System Variables. Scroll down in the User variables and double click on Path.
Go find the location of your python install with the python.exe file in it (you could search for it in your C:\ if you're willing to wait). Add that path to the Path variable list.
If you can't find the python.exe or just don't want to wait, reinstall your python installation and look for a checkbox with "Add to Path" or something along those lines.
In addition to the python.exe being in your path, make sure to add the "Scripts" folder in your path. It should be a subfolder in the same folder as python.exe.
For windows 10 install PIL and cImage.
Install Python 2.7.8 (64-bit — this is important)
https://www.python.org/ftp/python/2.7.8/python-2.7.8.amd64.msi
Install Python 3.4.1 (64-bit — this is important)
https://www.python.org/ftp/python/3.4.1/python-3.4.1.amd64.msi
Download and install Pillow for Python 2
https://pypi.python.org/packages/2.7/P/Pillow/Pillow-2.5.3.win-amd64-py2.7.exe#md5=33c3a581ff1538b4f79b4651084090c8
Download and install Pillow for Python 3
https://pypi.python.org/packages/3.4/P/Pillow/Pillow-2.5.3.win-amd64-py3.4.exe#md5=6ee659d7b945e826a07c53c15578424f (direct link)
https://pypi.python.org/pypi/Pillow/ (all other versions)
Download and install cImage
Navigate to https://github.com/bnmnetp/cImage
Click cImage.py, and click the button labeled Raw to see the contents of the file.
Click File > Save Page As (Chrome & Firefox) or File > Save As (Safari) to save the file on your computer.
Copy “cImage.py” from where you saved it to C:\Python27\Lib\site-packages and C:\Python34\Lib\site-packages\
Related
I have been working on a small rpg game by using python. I want a picture to pop up during the last boss and I have been told that is possible by using pillow. While trying to install it via this code:
pip install pillow
I get an error that states:
'pip' is not recognized as an internal or external command, operable program or batch file.
What am I supposed to do?
The issue is that the pip script by Python is not found by Windows. The reasons may be:
Improper installation of Python (leading to the file not being on your device)
PATH variable not set properly (leading to the inability of Windows to recognize pip, even if it is present on your device)
Verify if the script is present in your Python installation folder. The default path for pip and other scripts is C:\Users\<username>\AppData\Local\Programs\Python\<version>\Scripts
If there is a pip.exe file in that, just add the full path of the Scripts folder to the Windows PATH variable. Check out this link if you need help with setting the PATH variable
If the file is absent, I recommend a clean re-install of Python on your PC (just to ensure all files are present)
I'm starting to get extremely FURIOUS with the latest Windows environments (Windows 10):
I've just downloaded and installed Python, version 3.9.
The installer proposed to install it under "C:\Users...", I thought "No way, because if, for whatever reason, I remove this user, I might remove an installation of a program.", so I decided to install it under C:\Program Files, which is the most obvious place to install something.
First, that was not allowed: apparently that directory has special permissions, so I have started the installer as administrator. Everything went OK (at least that's how it looked): all files/directories seem to be present.
Then, I wanted to add some extra libraries, for which I wanted to launch pip3 install ..., but 'pip3' is not recognized as an internal or external command, operable program or batch file..
So in the Windows explorer, I typed file:pip* and indeed, nothing found.
Having a manual look into the directory C:\Program Files\Python\Python3.9\Scripts, I did find all pip versions (the normal one, the version 3 and the version 3.9 one), but having a look at my PATH environment variable, there seems to be nothing there, referring to my justly created C:\Program Files\Python directory.
So, my questions are very simple:
I am able to change my PATH variable myself, but what are ALL the directories I need to put there?
Why on earth does the Windows find feature not show the pip* files, when I look for them using the search parameter file:pip*?
Are there any other surprises I can expect?
Thanks in advance and sorry for the frustration in my question.
Yes, you can add the python binaries to PATH manually, but there may be a simpler option. In the first screen of the installer, there is a box that says "Add Python 3.9 to PATH":
For some reason, this box is not checked by default. So if you want pip and other binaries to be added to path during installation, you can just check this box.
So if you want, you can uninstall python (again) and reinstall it, this time making sure that box is check. However, if you want to just add the binaries to PATH manually, this is how you could go about doing that.
First, you need to get the path to the folder containing your binaries. To do that, navigate to your python installation, find the folder with the pip binaries, select it, and click "Copy path"
Now the path to that folder is copied to your clipboard.
Next you need to add that path to your PATH environment variable. To do that, follow these steps:
Go to start menu and type "path". Select the option that says "Edit system environment variables".
Click "Environment Variables..."
Scroll down and find "Path". Select it and click "Edit..."
Click "New"
Press Ctrl+v to paste the path you copied earlier. Hit enter.
Press Ok on each of the three open dialogues.
The pip binaries should now be in your path! Note that this procedure will work for adding any folder to PATH.
correction
i edited the environment variable to path Scripts, but in the command prompt on typing the pip command it does not shows up the package installation
python\scripts location picture
While executing the pip command in the command prompt, it shows pip is not recognized as an internal or external command, operable program or batch file.
I tried setting environment variables and all other alternative solution still I am not able to solve it. I recently noticed pip.exe file missing from python/scripts module.
Is that reason to show up this error? if it is yes, how will I install it manually?
You should add the full directory to the Scripts folder to your PATH environment variable. When you run commands in a command prompt, Windows will search through the folders listed in PATH.
Assuming you are on Windows 10:
Press the start button then search "Environment Variables"
Click the "Edit Environment Variables" option.
Click the "Environment Variables" button in the box that pops up.
Scroll down and find the PATH variable, double click it.
Click "New"
Paste in the path to the Scripts folder.
Save it and exit, then restart the terminal. Now pip will be recognized.
Finally I solved it.I used python 3.8.3 version.Not folder named "Scripts" in this version.I just delete this version and reinstall python 3.7.8 version and then pip is here :D
I know this has been solved, but another way of dealing with this is to create an empty file in the 'Scripts' folder and rename it to pip.bat. Then add the following code:
python -m pip %*
Which simply passes all the arguments of the pip command to python.
I've managed to install pymol on windows following the instructions here and using the file Pmw‑2.0.1‑py2‑none‑any.whl from here
Various folders have appeared in C:\Users\Python27\Lib\site-packages (Pmw and Pmw-2.0.1.dist-info). However, I can't actually work out how to run pymol.
It used to be provided as a .exe format which could just be run in the usual way for windows applications. The folders that have installed just contain lots of python scripts, but I can't find anything which actually launches the programme.
That's probably not the official way but it works :)
Download both the appropriate pymol and pymol-launcher file.
Install pymol via pip
change file extention of pymol-launcher to .zip (or unzip it straight)
get pymol.exe and make sure to have either pymol##.dll (## is your version number) in your path or in the same directory
Did it work for you?
I took another approach. NOTE! I am using Anaconda2 (python 2.7.13) under Windows 8.1
First download the appropriate files from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymol
Pmw-2.0.1-py2-none-any.whl
pymol-1.8.6.1-cp27-cp27m-win_am d64.whl
pymol_launcher-1.0-cp27-cp27m-win_amd64.whl
Start Command Prompt (Admin) via right-click on windows start button and navigate to your python installation directory
Enter the following lines (adapt to your installation of python)
C:\Users\David\Anaconda2>Scripts\pip.exe install Pmw-2.0.1-py2-none-any.whl
C:\Users\David\Anaconda2>Scripts\pip.exe install pymol-1.8.6.1-cp27-cp27m-win_am d64.whl
C:\Users\David\Anaconda2>Scripts\pip.exe install pymol_launcher-1.0-cp27-cp27m-win_amd64.whl
Now just launch pymol via pymol.exe that was created in the same directory.
I have Windows 7 (64-bit) operating system. I have installed python. I want to install setuptools (for python).
In their website (https://pypi.python.org/pypi/setuptools) it is written: "Download ez_setup.py and run it;"
I download that file, save it to my hard drive. Then when I click (right mouse button) and select "Open with"-> "python", a black console screen appears for a second, then disappears. And that's all.
What is wrong and how can I install that software?
Open a command prompt (Start menu -> cmd.exe)
Navigate to the directory where ez_setup.py is saved, e.g.:
cd C:\Users\You\Downloads
Run it (C:\Python27\ should already be on your %PATH%; if it's not, add it -- see below):
python ez_setup.py
Read the output. If it worked, you should be able to install packages like so:
C:\Python27\Scripts\easy_install jinja2
Add the path to easy_install to your %PATH% so that you can use it easily from any directory:
Control Panel -> System -> Advanced system settings
Click the Environment variables... button
Edit PATH and append ;C:\Python27\Scripts\ to the end (substitute your Python version)
Click OK. Note that changes to the PATH are only reflected in command prompts opened after the change took place.
If something goes wrong, the command prompt will remain open after the program finishes, so you'll be able to read the error and use it to resolve the problem.