I tried installing py2exe for converting python code to a exe file using WinPython-64bit-2.7.9.4.
I downloaded the file py2exe-0.6.9.win64-py2.7.amd64.exe
from https://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/
While installing using WinPython Control Panel, it shows an error message as below.
rename it as py2exe-0.6.9.win-amd64.exe, then try again
Sometimes it doesn't matter what the file is called, WinPython control panel won't like it. In this case, open up "WinPython Command Prompt.exe" (which is in the same directory as WinPython Control Panel) and run:
python -m pip install "name-of-python-package.whl"
Note: pip also requires the package filename to be formatted correctly, but if you have the latest version of pip and the latest python package, you should be fine.
This question is also related: .whl is not a valid wheel filename, storing debug log for failure in C:\
Related
I downloaded Thonny (which is a text editor for python) for using my Raspberry Pi Pico, and I tried to install a module in "Manage packages", when I began the installation, this error line code appeared:
ERROR: Can not combine '--user' and '--target'
Process returned with code 1
Fortunately there is another way to install modules and I tried it:
Install from a local file: I installed the package in cmd pip install Adafruit-SSD1306 in target directory of the Thonny's modules C:\Users\33631\AppData\Roaming\Python\Python310\site-packages, but I still don't see the module I installed.
After that, I figured out I can't install modules at all, and it brings me the same error message.
I use:
Python version: 3.10
Pip version: 22.3
Thonny version: 4.0.1
I tried many things, change the directory, install with the cmd and research with the Install from a local file, but it is still not working.
I use also the Thonny editor several years, but have never used his Tool | Manage packages... function. I use always pip install ... instead.
If you open this dialog, it shows you a Target path something like C:\Users\your_user\AppData\Roaming\Python\Python311\site-packages, depending on your phython version and path. I assume that python packages are installed always under the phython directory like C:\Python311\Lib\site-packages. My Thonny editor is olso there. Have you searched into python site-packages directory, too?
I am trying to install Pygame for Python 3.5.1, but it tells me to upgrade to the new version of pip. "You are currently using 7.1.2, use 8.1.2".
Here is a screen shot of it:
The error clearly states Access Denied.
Try to run cmd/powershell as administrator.
The installation error is not because of pip , though you should still upgrade pip
python -m pip install --upgrade pip
Pygame does not have python3.5 support yet. Check the binaries here
Pygame binaries
Try to use Python version 3.4 or 2.7 and then install pygame.
EDIT
You can find unofficial pygame binaries for several Python versions including Python3.5 here.
So if you do not find the official binary, you could try the appropriate file from the above link.
Note: The binaries given there are whl files. So you need to install them using pip.
Example: Assuming you have 32-bit Python installation, run pip install pygame-1.9.2b1-cp35-cp35m-win32.whl
See this answer for more detailed instructions.
Pip seems to be having a permission problem creating this directory: c:\program files (x86)\python35-32\Lib\site-packages\pygame
Here are some things you can try:
Navigate to that directory and see if it already exists. If it does exist, then try deleting it.
Try running pip as an administrator. Right click the command prompt icon and select run as administrator. Your path variables might not be set for the administrator, so you many need to give the full path for pip. In your python folder, it should be in a folder called scripts.
Since you're using Windows, you can also try the binary installers here: http://www.pygame.org/download.shtml
If nothing works you can try installing a different version of Python. I use Python 2.7.8 with pygame.
It was a problem based on the admin command run program and I figures it out.
I am running django python2.7 using Pycharm in windows.
Now I have some issue with redis queue not working in windows because of this
I am trying to do what this person did here. Use a cygwin version of python as pycharm interpreter.
(not sure if I downloaded all the packages or did correct steps)
I downloaded cygwin and install packages python2.7 + python-setuptools and then try to point my Pycharm interpreter to c:/cygwin/bin/python27.exe
see image
After that it seem ok and ask me to install packing tools pip, I clicked it and it give me this error:
see image
"Cannot start process, the working directory '\cygdrive\c\Users\User1G~1.SIS\AppData\Local\Temp\1\tmpYpudf2pycharm-management\pip-7.1.0' does not exist"
According to the error message it looks like pip can't be found... Are you sure you have installed pip?
Take a look here, how you can install pip: Installing Pip-3.2 on Cygwin
You can open a cygwin command line window and try to manually install the packages you want to.
I have previously installed Python 3.4.2 and 3.5.2 and in both cases I can dabble in writing and testing code in Idle which gives me two windows -- a "Run" window for code, and a "Shell" window for interaction and output (sorry, not sure of the correct terminology).
Now I'd like to try out scipy, particularly scipy.spatial.
First, I downloaded WinPython (WinPython-64bit-3.4.3.6Qt5.exe) from sourceforge.net/projects/winpython/files/ but when I tried to install it, it wanted to put it in my Downloads folder (where the installer was saved, obviously) so I browsed to Program Files and tried to install there but I get
Error opening file for writing
C:\Program Files\WinPython-64bit-3.4.3\IDLE (Python GUI).exe
Same response at C:\Program Files (x86)\.
Next, I downloaded just scipy-0.16.1-win32-superpack-python3.4.exe and it seemed to be successfully installed until I try to run import scipy in my usual "Run" window I get
ImportError: No module named 'numpy'.
Third, I retried WinPython-64bit-3.4.3.6Qt5.exe again, but this time accepting the default Downloads install location. This time there was a successful installation of python-3.5.1.exe in Downloads. When I ran it I chose "Repair" and eventually got "Repair was sucessful." However, when I try to run import scipy in my usual "Run" window I get
ImportError: No module named 'scipy'.
What steps am I missing? What is the easiest way for me to try using scipy?
Assuming you have correctly installed Python, you can try using the .whl (wheel) files available on the LFD's website.
First, make sure you have an updated version of pip which supports the use of .whl files by using the following command in the terminal:
python -m pip install -U pip
Then, download the latest versions of the .whl files for NumPy and SciPy into some directory you can easily locate.
Afterwards, use the following command to install the .whl files you've downloaded in the necessary order:
python -m pip install C:/path/name-of-file.whl
I am trying to install a package named QSTK for a course that I am doing. The course points to an installation package for the 32 bit version, but I have 64 Python installed. I have found a .egg file listed on the Python packages index.
It seems to have an exe for 32 bit, but just the .egg for 64 bit. I downloaded the QSTK-0.2.6-py2.7.egg version and have been trying to install this unsucessfully so far.
Here is what I have tried:
Using easy install (from the C:\Python27\Lib\site-packages
directory):
Python easy_install -Z C:\Users\Prosserc\Downloads\QSTK-0.2.6-py2.7.egg
this has created a QSTK-0.2.6-py2.7.egg directory in my
site-packages directory which I can open and find files in. However,
I have tried to import QSTK from the python shell and get the usual
"No module named..." import error.
I looked for a setup.py file as I have used these to install
packages before, but could not find one.
I have also looked at this thread which gives details of
installing a .egg file without using easy install, but cannot figure
out what changes I would need to make to the script provided as this
is to install a specific package that I already have.
If anyone can help by explaining either how I can install this .egg file correctly or by providing a link to the QSTK modules for python 2.7 64 bit in another format this would be greatly appreciated.
I have managed to install the packages that QSTK is dependant on okay (numpy, scipy, matplotlib, pandas, python-dateutil and scikit-learn).
You should add -m before easy_install
for example:
python -m easy_install C:\Users\Prosserc\Downloads\QSTK-0.2.6-py2.7.egg
How about if you unpack the .egg (it's just a .zip in disguise), then cd into it and run python setup.py install? Will that run fine and will you then be able to import your module?
I'm saying this because if the .egg file does get put under site-packages as appropriate but you're still not able to import, this might be a problem in the code itself.
I have finally found another place to download this from with a package that works: https://pypi.python.org/pypi/QSTK/0.2.6 has a QSTK-0.2.6.tar.gz option to build it from the source code.
Unzipping this (then again once down to the .tar), I could find the setup.py file and install by going to the directory with the setup file and running:
python setup.py install
I tried copying the contents of the .egg folder in the path Lib\site-packages .
It worked and didn't throw any ModuleNotFoundError .
I found pip install qstk works perfectly for 64x 2.7 python at win 7