Trouble installing pygame using pip install - python

I tried: c:/python34/scripts/pip install http://bitbucket.org/pygame/pygame
and got this error:
Cannot unpack file C:\Users\Marius\AppData\Local\Temp\pip-b60d5tho-unpack\pygame
(downloaded from C:\Users\Marius\AppData\Local\Temp\pip-rqmpq4tz-build, conte
nt-type: text/html; charset=utf-8); cannot detect archive format
Cannot determine archive format of C:\Users\Marius\AppData\Local\Temp\pip-rqmp
q4tz-build
Please if anyone have any solutions please feel free to share them!
I also tried
pip install --allow-unverified, but that gave me an error as well.

This is the only method that works for me.
pip install pygame==1.9.1release --allow-external pygame --allow-unverified pygame
--
These are the steps that lead me to this command (I put them so people finds it easily):
$ pip install pygame
Collecting pygame
Could not find any downloads that satisfy the requirement pygame
Some externally hosted files were ignored as access to them may be unreliable (use --allow-external pygame to allow).
No distributions at all found for pygame
Then, as suggestes I allow external:
$ pip install pygame --allow-external pygame
Collecting pygame
Could not find any downloads that satisfy the requirement pygame
Some insecure and unverifiable files were ignored (use --allow-unverified pygame to allow).
No distributions at all found for pygame
So I also allow unverifiable:
$ pip install pygame --allow-external pygame --allow-unverified pygame
Collecting pygame
pygame is potentially insecure and unverifiable.
HTTP error 400 while getting http://www.pygame.org/../../ftp/pygame-1.6.2.tar.bz2 (from http://www.pygame.org/download.shtml)
Could not install requirement pygame because of error 400 Client Error: Bad Request
Could not install requirement pygame because of HTTP error 400 Client Error: Bad Request for URL http://www.pygame.org/../../ftp/pygame-1.6.2.tar.bz2 (from http://www.pygame.org/download.shtml)
So, after a visit to http://www.pygame.org/download.shtml, I thought about adding the version number (1.9.1release is the currently stable one).
--
Hope it helps.

If you get trouble when install pygame error about missing visual studio 10+. I have the answer:
The problem is not about have or not have visual studio, because I try many version but it not work. The problem is file: between tar.gz and .whl
so, this is the solution:
1) Download file:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame
Go here and download your pygame version, notice about x64 or x86 and python version. My system is x64 and python is 3.4 so I choose: pygame-1.9.2a0-cp34-none-win_amd64.whl
2) Put it in some where to install:
I put it in "C:", so open cmd: and type:
cd C:\ (this is change location to C:)
3) Install
pip install C:\pygame-1.9.2a0-cp34-none-win_amd64.whl
Done !

I realized that the compatible Pygame version was simply corrupted or broken. Therfore i had to install a previous version of python to run Pygame. Which is actually fine as most modules aren't updated to be compatible with Python 3.4 yet so it only gives me more options.

I myself got this error(while using v3.10.0) and then I uninstalled the latest version and installed older version of python(v3.9.7) and it fixed the issue. Hope that works for you too. Honestly there are not many changes in the fix unless they jump from python3 to python4. so you dont need to update the python just for the sake of latest-ality

Related

Pip Errors Out When Installing Anything

I've run into an odd issue where pip just won't work. I'm using the latest version of PyCharm, and I've tried both Python 3.8.10 and 3.9.6.
I've done clean installations of both, removed from PATH, reinstalled with new installer, reinstalled pip, etc.
The error code I run into appears no matter what library I am trying to download. I've tried PyAudio, PyGame, OpenCV-Python and others.
Pip was working fine a couple days ago, and no changes have been made to any files in that time.
Attempting to run pip install --upgrade pip does not have an effect.
I've been running off virtual enviroments with setuptools 40.8.0 and pip 21.1.3 installed.
The full error for installing PyAudio can be seen here: https://pastebin.com/iQmZwsRv
PyGame error: https://pastebin.com/WEF8uM2d
OpenCV-Python Error: https://pastebin.com/LuZq99Cu
Py- audio - it's not compatible with your Py charm I suppose due to the latest install updates, try to install it on the main environment. Also, try to downgrade your version of python as many dependencies are not compatible with your version of python as stated by error[it is not compatible with this Python]
Open Cv - Fails to build the wheel package as it is attributed also in error [CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.]
May I know what build tool are you using?

pyperclip module raising an error message

I'm using Python 3.4.0 on ArchLinux (without X11) as guest in a Vagrant box. When running my script I get this error message:
Pyperclip could not find a copy/paste mechanism for your system
According to this link, I've installed xsel and xclip packages but I cannot install gtk nor PyQt4 modules, because I get this another error message:
Could not find a version that satisfies the requirement PyQt4 (from
versions: )
According to this post, I should install python3-pyqt4 package, but the package more near showed by pacman is python-pyqt5 and it requires to install many packages included packages for X11. Is this necessary? I wish to preserve my distro light as possible.
Any solution? Thanks in advance.
This method fixed it for me.
pip install QtPy
also you could refer to this thread for more help
https://pyperclip.readthedocs.io/en/latest/introduction.html#not-implemented-error

Pygame for Python 3.5.1 (Nothing I've tried has worked)

I've been trying to install pygame for Python 3.5.1 on Windows 10, 64 bit. Everything I've attempted so far has resulted in an error message in some form.
My latest attempt has been when I downloaded pygame-1.9.2a0-cp35-none-win_amd64.whl (also tried the 32-bit, got same error) from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame and dragged the .whl file into Python35-32/Scripts. I then proceeded to go to command prompt and do the pip install thing, to which I got this message:
"Could not find a version that satisfies the requirement pygame-1.9.2a0-cp35-none-win_amd64 (from versions: )
No matching distribution found for pygame pygame-1.9.2a0-cp35-none-win_amd64"
I am aware that I may be installing it incorrectly, but from my understanding of other guides, this is what they say to have done. I would greatly appreciate help if possible.
It sounds like you've left the file extension off of the filename when you're calling pip install. Make sure you include the .whl extension, of pip will think the file name is the name of a package it should be downloading for you.
Pygame is not compatible with python 3.5. But it is with python 3.4. You can find binaries at: https://bitbucket.org/pygame/pygame/downloads
For previous version of python: https://www.python.org/downloads/
The first thing to check is that you have the 64 bit version of Python (the default windows download is 32bit). If not, here's the link:
https://www.python.org/downloads/release/python-360/
When you have the 64 bit python going, From the command prompt / Powershell, use "pip install pygame" or "python -m pip install pygame" then you will be sure the os, python, and pygame are all 64bit, mixing and matching doesn't work.

Unable to install 64-bit Pygame on Python 3.4

I have 64-bit python 3.4 installed, which comes with pip. I wanted to install pygame, and I know that the 32 bit version that they have on their site wouldn't work with my version of python. So I downloaded the 64-bit python 3.4 pygame package from here (pygame‑1.9.2a0‑cp34‑none‑win_amd64.whl). I renamed the package to pygame.whl and tried to use pip on the command line to install it, but it gave me this error;
Collecting pygame
Could not find a version that satisfies the requirement pygame (from versions:
)
Some externally hosted files were ignored as access to them may be unreliable
(use --allow-external pygame to allow).
No matching distribution found for pygame
So I tried using the --allow-external option, but it gave me a different error and asked me to provide a requirements file. I looked around, and found that I might need to try using the --pre option, but it gave me the exact same error as above regardless. How can I install the package?
The most likely reason you failed to install the .whl package is that you typed
pip install pygame
at the command prompt, instead of switching to the directory where you stored your renamed pygame.whl and running
pip install pygame.whl
pip requires that you give the full name of the file being installed.
The error message you got indicates that you ran the first command, and pip was looking in PyPI for pygame (which isn't there). The --allow-external command would have allowed you to specify a remote location where a source file or .whl file could be found.
In the future, I'd recommand not renaming the files downloaded from the (quite excellent) site you linked to, so that when you try to install them you're sure you're running the right command. Remember, you can always use Tab to complete file names on the command line.

Install pywin32 with pip in Windows 7 does not work in python 3.4.2

Hy#everybody,
i've try to install pywin32 via pip (1.5.6) with python 3.4.2 under Windows 7, but i've always got the follwing error-message:
Could not find any downloads that satisfy the requirement pywin32
Some externally hosted files were ignored (use --allow-external pywin32 to all
ow).
Cleaning up...
No distributions at all found for pywin32
Storing debug log for failure in C:\Users\tonka\pip\pip.log
All other installations with pip works absolutely fine. On pypi.org, there is an package for pywin32, so don't really understand why this is happening.
I've also tried this --allow-external flag, but then i got the following error
Could not find any downloads that satisfy the requirement pywin32
Some insecure and unverifiable files were ignored (use --allow-unverified pywi
n32 to allow).
Cleaning up...
No distributions at all found for pywin32
Storing debug log for failure in C:\Users\tonka\pip\pip.log
Then i used the --allow-unverified flag and i get this error
Could not find any downloads that satisfy the requirement pywin32
Cleaning up...
No distributions at all found for pywin32
Storing debug log for failure in C:\Users\tonka\pip\pip.log
Is there a package in pip for pywin32 for 3.4? pypi-link
Does anybody has the same problem/behavior?
Edit:
For anybody who is searching for a way to install pywin32 via pip. Use the package pypiwin32 instead of pywin32, it is the same package, but it is pip-able
Greetings
Tonka
In answer to your first question, it appears that there is not a pip pywin32 package for python 3.4. If you take a look at this page: url https://pypi.python.org/simple/pywin32/, you can see that there is a 214_download_url. This indicates that version 214 is the latest available, and the 214 download directory here does not contain an installer for anything later than python 3.1.
In answer to your second question, yes, I see the same problem/behaviour with python 3.4.1. As mentioned by #sk11 in a comment, you can download an installer from here. (I can't add a comment because I don't have the rep.) I've just tried the installer and it appears to work fine.

Categories

Resources