Python PermissionError(13, 'Permission denied'))': /simple/pytest/ - cannot install packages - python

I have an issue with installing packages on my WIN11. Until today, I used Python 2.7, which worked, but I upgraded to 3 because I want to use pytest. Now, however, I cannot install packages.
My Python version 3.11.0 and pip version is 22.3. Here is the screenshot of what I see:
What I've tried:
I reinstalled and rebooted
I modified the environmental variables
I ran the cmd prompt as admin
I disabled path length limit too.
I tried pip3 instead of pip.
I tried installing Python to another directory
I tried installing packages in Pycharm
I downloaded the packages manually from pypi and tried installing them
How can I resolve this error?

I found the solution here: stackoverflow.com/questions/71999820/… this is a bug in python. 3.10.4, 30.10, 30.9, 30.8 is not working for me. Only python 3.7.4. I just downgraded to python 3.7.4 and now installing packages works well!

Related

Tensorflow pip install on mac with python3

I know this has been asked many times, I saw them tried to solve my problem but I can't, nothing works for me.
I have a mac m1, My os version is BigSur 11.5.1
My python3 version is 3.8.10
I have a project folder, which I created my env in there as atai_env
I ran pip upgrade, my pip version is current which is 21.3.1
I activated my env and ran pip install tensorflow which gives this error;
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow
I saw some command as pip install tensorflow-macos so I tried it, it seems to install but at the end it gives this Failed to build h5py which I tried to install but failed again
Then I tried to ran pip command given here for python 3.8 -> https://www.tensorflow.org/install/pip and it gives below error;
tensorflow-2.7.0-cp38-cp38-macosx_10_11_x86_64.whl is not a supported wheel on this platform.
I am so sick of this :/ I tried to install other versions of python but it always fails. Can someone explain what should I do, I can't believe I spent more than 2 hours on this.
On the tensorflow install page, it seems I should only be running pip install tensorflow but that doesn't work
Ok, Nothing that I found on google helped. I started over, and decided to try python versions starting from 3.9 with decreasing versions. Finally this command just worked -> pip install tensorflow with python 3.7.9 It is so frustrating, cost me a few hours. I wasn't expecting it would be unstable like this. Anyway, if you happen to face it just try to use one of the version 7 even tho tensorflow says it works for 3.7 - 3.9
PS: I am sorry but this is really stupid, it is almost 2022 and we are working on AI with this framework comon :/
I have MacOS BigSur 11.6.1 running and just created a virtualenv with Python 3.8.12. Installing tensorflow works without any problems:
pip install tensorflow
pip install tensorflow 1 err | 8s | voice_assistant py
Collecting tensorflow
Downloading tensorflow-2.7.0-cp38-cp38-macosx_10_11_x86_64.whl (207.1 MB)
I could successfully install and run TensorFlow from my M1 MacBook Pro. Monterey 12.4. Here's what I did:
1. Install Homebrew first
How typical.
2. Install Anaconda via Homebrew
brew install anaconda
Installing Python is a mess and I know most tutorials will suggest to use pyenv as the version management tools. I tried that, but didn't work. What worked for me is Anaconda.
3. Download PyCharm
It's a GUI-friendly way to switch between Python versions and environments.
4. Set the Python interpreter inside PyCharm
Note that I use Conda Environment. Note also that the conda executable is inside /opt/homebrew/anaconda3/bin/conda.
5. Install tensorflow-macos from the PyCharm terminal
After doing this, you can import tensorflow as tf inside your .py files.
You can try upgrading the version of pip.

Can't install lxml for python 3.8.1 on windows

I am on Windows 10 64-bit, in a venv.
Pip install lxml return
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
So I tried to use the appropriate .whl availlable here (lxml-4.5.0-cp38-cp38-win_amd64.whl) which leads to another error:
lxml-4.5.0-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.
I tried to use pip.exe, pip3.exe, pip3.8.exe and the 64x and 32x bit versions of the .whl file without success
Am I missing something or is the Python 3.8 version of the package not compatible with Python 3.8.1?
This happens because you probably have an older version of python alongside 3.8 and when you install the package it references the older one. You can try deleting all python versions and installing Python 3.8 again
I used deactivate to get out of venv mode, then it worked.
Use "pip3 install lxml" and you will get it installed. Make sure you have updated pip3 version. You can install it by "easy_install -U pip3". Let me know in case of issues.

Kivy_deps.glew.whl is not a supported wheel on this version

I was trying to install kivy_deps.glew(version).whl with
pip install absolute/path/to/file/kivy_deps.glew
And I get this error:
kivy_deps.glew(version).whl is not a supported wheel on this version
I searched in the web and saw that some people said that the problem is because you shoud have python 2.7 and I have python 3.7. The version is of glew is cp27. So if this is the problem how to install python 2.7 and 3.7 in the same time and how to use both of them with pip.(i.e maybe you can use
pip2.7 install
For python 2.7 and
pip install
For python 3.7
P.S: My PC doesn't have an internet connection that's why i'm installing it with a wheel file. I have installed all dependecies except glew and sdl2. If there is any unofficial file for these two files for python 3.7 please link them.
I know this question has been asked before in stackoverflow but I didn't get any solution from it(it had only 1 anwser tho)
Update: I uninstalled python 3.7 and installed python 2.7, but pip and python weren't commands in cmd because python 2.7 hadn't pip. So I reinstalled python 3.7
I fixed it. Just changed in the name of the file cp27 to cp37

Pip Install throws error code 1

Recently switched from MacOSX to a ThinkPad with Windows 10.
Installed Python 3.7, Pip 9
Attempted pip install jupyter and received the following error:
Command python setup.py egg_info failed with error code 1 in
C:\Users\BRIANM~1\AppData\Local\Temp\pip-build-greiazb7\pywinpty\
Uninstalled setup tools, upgraded setup tools, upgraded pip, ran as admin, all the traditional fixes are not working.
Anyone have a fix?
Check that you have installed the 64-bit version of python and try again with
pip3 install jupyter notebook
If it still doesn't work than I would prefer you to use Anaconda it offers the easiest way to install, run and update libraries and packages and virtual environments for windows.
It comes with jupyter notebook pre-installed. On the jupyter notebook doumentation page they also recommend installing it using anaconda
I had the same problem and I found a solution that worked for me. Instead of pip I used: py -m easy_install textract
You should downgrade to python 3.6.5 (after trying all ways you can find on the Internet).
Today, I install python 3.7.0b5 on a new computer(windows 10). Then pip install didn't work with this error code 1. I tried all methods I can find on the Internet. And still stuck here. So I downgrade to 3.6.5 which works well on my mbp. Finally, it works!!!

PIL: DLL load failed: specified procedure could not be found

I've been beginning to work with images in Python and I wanted to start using PIL (Pillow). To install it, I ran pip install Pillow. When installing, PIL was not previously installed. I also tried uninstalling it and reinstalling it, as well as using pip3 install Pillow.
When I run it in Python, my first line is:
File "C:\Program Files\Python36\lib\site-packages\PIL\Image.py", line 56, in <module>
from . import _imaging as core
ImportError: DLL load failed: The specified procedure could not be found.
I checked the directory, and the file _imaging.cp36-win_amd64.pyd is present under the PIL folder.
Why is this happening if the needed DLL is there? How can I fix it?
I had this problem as well with Python 3.6. I just avoided the problem by uninstalling pillow (4.1.0) and then installing an older version of pillow (4.0.0). It seems to run okay with the older version.
As in Sean's answer, I had to uninstall (I'm using Anaconda Python 3.6, BTW) with
conda uninstall pillow
I tried it with PIL, but there was no such package. Uninstalling pillow also meant uninstalling packages that depend on it, in my case "anaconda-navigator" and "scikit-image". After I reinstalled Pillow 4.0.0 with
conda install pillow=4.0.0
and tested it with
python -c "from PIL import Image"
which, if successful, you don't see an error message, I reinstalled the packages that were uninstalled along with Pillow 4.1.0.
conda install anaconda-navigator
conda install scikit-image
If you're using Anaconda, try
conda uninstall pillow and then pip install pillow
Came across this issue while working on Caffe2 on Windows 10 (Anaconda 4.5) and this worked for me. Here's the github post on this issue.
This problem is also fixed by upgrading Python to 3.6.1, per this GitHub discussion.
The difference is that Pillow 4.1.0 was built with Python 3.6.1 while Pillow 4.0.0 was built with Python 3.6.0.
Apparently PYTHON36.DLL from Python 3.6.0 is missing functions (PySlice_AdjustIndices and PySlice_Unpack) that are used when building with Python 3.6.1.
The solution is to upgrade to Python 3.6.1.
There's a problem in Python itself which means binary wheels build using Python 3.6.1 (like Pillow 4.1.0) won't install on Python 3.6.0.
This has affected a number of Python libraries.
However, there's the new Pillow 4.1.1 release works around this, so you can now update to Pillow 4.1.1 and use it with both Python 3.6.0 and 3.6.1.
More info:
https://github.com/python-pillow/Pillow/issues/2479
https://mail.python.org/pipermail/python-dev/2017-March/147707.html
https://bugs.python.org/issue29943
for new people 2022
i solved it
you can look at this
https://pillow.readthedocs.io/en/latest/installation.html
if PIL dont want to uninstall delete or cut it to another folder
This works for me using win10 and py 3.6.
Simply uninstall Pillow 4.1.0
pip3 uninstall Pillow
Then install Pillow 4.0.0
pip3 install Pillow==4.0.0
I had the same problem with anaconda 5.0.1, using it with caffe on windows 10. i just did
conda install PIL
it worked for me.
Seems like some issue is there with tensorflow 1.12.0 +Python 3.6.0 + win10
Working fine with conda tensorflow.
below steps worked for me for pip tensorflow.
uninstall tensorflow
replace your python version with 3.6.1
install latest version of tensorflow(1.13.0)
For installing Tensorflow follow below link:-
https://www.tensorflow.org/install/pip
If you are a Windows user and do not have Microsoft Visual C++ the error occurs. I got the same error and resolved this by installing the Microsoft Visual C++. Link for downloading can be found here.
https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0
First uninstall existing version
pip uninstall pillow
Then try installing
pip install pillow==4.0.0

Categories