How to fix install error in cx_freeze with pip? - python

I was trying to install cx_Freeze and every time an error happens. I tried to install it with pip, that didn't work, and I'm trying to install this by wheel, downloading the cx_freeze file from https://pypi.org/project/cx_Freeze/4.3.4/#files and using pip to install it by:
pip install cx_Freeze-5.1.1-cp36-cp36m-win_amd64.whl
I already have wheel installed in my computer.
How can I fix this?

if you want to install cx-freeze module you do not need to mention whole file directory...
you can just type:-
pip install cx-freeze
copy this command and paste it in cmd(command prompt)
if you want to install any package you have to write:-
pip install (package name)
hope the answer will be useful

Related

Pygame install issue: Unable to establish a new connection error [duplicate]

I am trying to use command pip install pygame in cmd, but there is error.
The error is shown as follows:
C:\Users\Administrator>pip install pygame
Collecting pygame
Using cached https://files.pythonhosted.org/packages/80/2c/3a52e7e9c097229b026b4efbe6711c600f3a84ffdc5f11fd9e7f8932368e/pygame-1.9.6-cp37-cp37m-win32.whl
Installing collected packages: pygame
Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: 'c:\\program files (x86)\\python37-32\\Lib\\site-packages\\pygame'
Consider using the `--user` option or check the permissions.
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I follow the instruction in the error but still cannot solve the problem. And I also found whatever "pip" command cannot be installed correctly.
You can install the package as Administrator, by following these steps:
1.Right click on the Command Prompt icon
2.Select the option: Run This Program As An Administrator
3.Run the command: pip install pygames
Instead of you can use the command
pip install --user pygames
The other answers didn't work for me. I checked this site and made sure that pip, setuptools, and ez_setup were installed at the latest versions. Still no luck. Finally, I discovered the magic words here:
pip install pygame --pre
Per this, --pre option tells pip to include pre-release versions of packages when searching for the latest version. Apparently that's what's needed as of this writing (2023-02-08).
(Thanks to accddd)
check if Pip was installed correctly by opening a command prompt and entering the following command:
pip -V
output should be like:
pip 18.0 from c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip (python 3.7)
if pip is not install copy this file link and save it to setup.py
now open cmd and run script by typing
python setup.py
for more details check link.
when pip in install correctly install run this commond
python -m pip install -u pygame --user
For this, you have to install pygame package from the cmd (on Windows) or from the terminal (on mac). Just type pip install pygame.If it doesn't work for you, then try using this statement pip3 install pygame. If it is still showing an error then you don't have pip installed on your device and try installing pip first.

ERROR: PyAudio-0.2.11-cp38-cp38-win_amd64.whl is not a supported wheel on this platform

I am trying to install pyaudio in python 3.8 and when i execute
pip3 install PyAudio-0.2.11-cp38-cp38-win_amd64.whl
it shows an error that
ERROR: PyAudio-0.2.11-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.
You can try:
pip install pipwin
pipwin install pyaudio
If this doesn't work, you can manually add and install pyaudio.
First, go to: https://www.lfd.uci.edu/~gohlke/pythonlibs/
and check the pyaudio supporting to your Python version.
For example: if you have Python 3.8.2, then PyAudio‑0.2.11‑cp38‑cp38‑win_amd64.whl
After downloading, copy that file and paste it in C://Users/[user]/
Then open cmd and write:
pip install [full filename]
If this doesn't work, change the file directory to
C:\Users\[user]\AppData\Local\Programs\Python\Python38\Scripts
Then restart cmd and run again pip install [full filename].
download pyaudio from:
lfd.uci.edu/~gohlke/pythonlibs/#pyaudio
installing PyAudio‑0.2.11‑cp39‑cp39‑win_amd64.whl
I have error:
ERROR: PyAudio-0.2.11-cp39-cp39-win_amd64.whl is not a supported wheel on this platform.
But PyAudio‑0.2.11‑cp38‑cp38‑win_amd64.whl
install successful:
pip install .\PyAudio-0.2.11-cp38-cp38-win_amd64.whl
Processing c:\users\sje\downloads\pyaudio-0.2.11-cp38-cp38-win_amd64.whl
Installing collected packages: PyAudio
Successfully installed PyAudio-0.2.11
Check version:
python --version
You need:
py -3.9 -m pip install [name packege]
"-3.9" - own Python version
Example:
py -3.9 -m pip install PyAudio-0.2.11-cp38-cp38-win_amd64.whl
In the case of Mac OSX do:
brew install portaudio
pip install pyaudio
open run and type appdata and go to programs python38 and open file name script in that file past that download 'PyAudio-0.2.11-cp38-cp38-win_amd64' and in that path address click and type cmd and enter open cmd than type pip install PyAudio-0.2.11-cp38-cp38-win_amd64 and enter.
Done
What fixed it for me was upgrading to the latest pip:
pip install --upgrade pip
After that the install succeeded.
Bro, this is a very easy fix. I was playing around with the wheel file directory and I wondered if it would work in the projects venv/scripts directory, and IT WORKS :)
Don't forget to use cmd and use:
pip install (full filename)

How to solve the "pip install pygame" issue?

I am trying to use command pip install pygame in cmd, but there is error.
The error is shown as follows:
C:\Users\Administrator>pip install pygame
Collecting pygame
Using cached https://files.pythonhosted.org/packages/80/2c/3a52e7e9c097229b026b4efbe6711c600f3a84ffdc5f11fd9e7f8932368e/pygame-1.9.6-cp37-cp37m-win32.whl
Installing collected packages: pygame
Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: 'c:\\program files (x86)\\python37-32\\Lib\\site-packages\\pygame'
Consider using the `--user` option or check the permissions.
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I follow the instruction in the error but still cannot solve the problem. And I also found whatever "pip" command cannot be installed correctly.
You can install the package as Administrator, by following these steps:
1.Right click on the Command Prompt icon
2.Select the option: Run This Program As An Administrator
3.Run the command: pip install pygames
Instead of you can use the command
pip install --user pygames
The other answers didn't work for me. I checked this site and made sure that pip, setuptools, and ez_setup were installed at the latest versions. Still no luck. Finally, I discovered the magic words here:
pip install pygame --pre
Per this, --pre option tells pip to include pre-release versions of packages when searching for the latest version. Apparently that's what's needed as of this writing (2023-02-08).
(Thanks to accddd)
check if Pip was installed correctly by opening a command prompt and entering the following command:
pip -V
output should be like:
pip 18.0 from c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip (python 3.7)
if pip is not install copy this file link and save it to setup.py
now open cmd and run script by typing
python setup.py
for more details check link.
when pip in install correctly install run this commond
python -m pip install -u pygame --user
For this, you have to install pygame package from the cmd (on Windows) or from the terminal (on mac). Just type pip install pygame.If it doesn't work for you, then try using this statement pip3 install pygame. If it is still showing an error then you don't have pip installed on your device and try installing pip first.

Getting ImportError: No module named 'Crypto' after installation

I am getting ImportError: No module named 'Crypto' error when trying to run. I have installed pycrypto using pip install pycrypto and updated it also. Everything I have tried to far has been unsuccessful.
Tried:
reinstalling pycrypto,
updating both python and pycrypto
Any suggestions?
The error messages says, it does not able to find the module so please try to run below command,
#pip list -- # what does it show to you, if it would have installed successfully it will show you up there.
if "pip install pycrypto" doesn't work so try to download the source tar ball and try to install it from prompt.
pip download pycrypto
it will download tar.gz file.. so you can install using with pip install --no-index --find-links /path/to/some/dir/ pycrypto
for python3.5 version
python3.5 -m pip install pycrypto
this will install in python3.5 environment and after that you can able to import pycrypto module
Is python defined properly on your machine?
Make sure PATH environment variable has python's installation folder in it

pip install tries to install already installed package in anaconda3

So, Iere is what I encountered:
I try to install pip install lxml under windows, python3.5 (anaconda3), and I have the error saying that
running build_ext
building 'lxml.etree' extension
error: Unable to find vcvarsall.bat
so of course I downloaded lxml for http://www.lfd.uci.edu/~gohlke/pythonlibs, and installed without a problem using the .whl file, and then I try to install a package that depends on lxml, pip is trying to build lxml again and does not aware it already has been installed....
Second problem, I upgraded pip to 8.1.2, and when I do pip --version i have 8.1.2. however, when I try to pip install something, I still get the message:
You are using pip version 8.0.0, however version 8.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
anyone had the same problem? so strange, before I never had such issues.
Update
I think i found the answer, i have ignore-installed=true in my pip.ini, dont know how this was set, when i delete the line, everything worked

Categories