Unable to use pip due to Permission Error - python

At the moment, when I try to do anything with pip or pip3, it always returns this error:
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\My local user name\\AppData\\Local\\Temp\\tmpfi3qmtn7'
I'm not sure what the file that's causing this problem is, but I can't install or uninstall packages with pip, nor can I upgrade pip itself. I have the latest version of Python installed as well as Windows 10, and pip was working just fine earlier.
Any help would be appreciated!

As the error message states, pip is currently being used by another process. Check if you have any pip processes running in the background. If you can't see anything, try using Process Explorer (Download, Instructions).
Alternatively, you could try restarting your computer to see if that helps.

Related

Could not install packages due to an OSError

i' trying to run the python video annotator software installed through pip but this error show me everytime
ERROR: Could not install packages due to an OSError: [WinError 5] Accesso negato: 'C:\Users\SZN\AppData\Local\Temp\pip-uninstall-5ejn6so7\qt5webenginecore.dll'
Consider using the --user option or check the permissions.
I've tried the "--user" method but nothing changed, i've tried to uninstall it many times but nothing, idk where to give permission and my pip is updated, any solution?

Issues installing Jupyter Notebooks - Python 3.9 - Windows 10

I am having issues installing Jupyter Notebook. I will preface this by saying I have an elementary understanding of coding and how to properly set up my environment. When using the pip command pip install jupyter it begins processing, but I end up with the following error. One issue that I may have is a long file name, but I am unsure how to correct that considering I have never physically used this path. I also have a space between my first and last name in my user folder which may be causing the issue. It is my understanding that changing my username could cause unanticipated downstream issues, so I have not tried to change it.
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\Users\\FirstName LastName\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\jedi\\third_party\\typeshed\\third_party\\2and3\\requests\\packages\\urllib3\\packages\\ssl_match_hostname\\_implementation.pyi'
I have also tried the following syntax which both end with the above error
pip install --upgrade --force-reinstall jupyter
pip3 install --upgrade --force-reinstall jupyter
I tried installing both Anaconda and git bash. When I try to open through Anaconda, it acts like it is processing to open, then just stops and nothing happens.
Using git bash, I have tried the following command. I don't get any errors, but it also does not solve my problem.
Anaconda3/Scripts/activate
This seems to be a pretty common problem, so I am surprised I haven’t been able to solve it myself. What am I missing?
Edit: This is solved, thank you #Dschoni. Using the Anaconda prompt, I typed jupyter notebook and it opened.
I was getting this error when I installed Python on my Windows 10 machine through the Microsoft Store. Once I uninstalled it and installed the version downloaded from the official https://www.python.org/downloads/ this error did not happen anymore.

Python: Showing unmet dependencies error and broken packages error despite not having any such packages

We were trying to run a shell script for installing prerequistes(install_prerequistes_onnx.sh) for OpenVINO Model Optimizer but we got the following error:
The Error
We tried resolving it using python 3.6.7 in a virtual environment(tsc). But it was of no use. Also we do not have any broken packages(we checked for them explicitly) but it still shows "unable to correct problems, you have held broken packages".
Can anyone explain the last three lines of the error? Also what does "error in line 78" imply, since our notebook was running fine before incorporating OpenVINO.
PS: We are using Ubuntu 18.04.
Please ensure that you’ve installed external software dependencies.
You may refer to this link for the installation:
https://docs.openvinotoolkit.org/2021.3/openvino_docs_install_guides_installing_openvino_linux.html#install-external-dependencies
For your virtual environment, the broken packages error that you’re facing is due to the Python’s dependency package version is not available on your system.
Try with this command: sudo apt update && sudo apt upgrade
If the issue still persists, you may need to re-install Python.

Python package: pywin32_postinstall returns error

I'm trying to run python script as a windows service and then I need to use pywin32.
After installation pywin32 via pip install I should run pywin32_postinstall as python pywin32_postinstall -install. I've got this reply and have no idea about this situation anymore:
'scripts/pywin32_postinstall.py' not found in metadata at c:\python\lib\site-packages\
As a result I can't run my service.
Did You meet similar situation or have You any ideas?
I solved my problem!
Don't install via pip
Just need to download suitable file from here: https://github.com/mhammond/pywin32/releases
After the installation run python pywin32_postinstall -install and no errors will not occur.
try running "python scripts\pywin32_postinstall.py -install" from the root of the install directory

Error when installing python

I was trying to install python and for some weird and unknown reason, the installation process is stopped and returns this error
An error occurred during the installation of assembly 'Microsoft.VC90.CRT,version="9.0.21022.8",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="amd64",type="win32"'. Please refer to Help and Support for more information.
This is the first time I encountered such error. I tried 'googling' it but there seems to be no way to fix this up. Do you guys have any suggestions? I just want to install python.
I know this is an old post but I recently ran into this exact same issue.
It was caused by my machine having pending Windows updates that needed a restart to be applied.
Once you've reset your machine remove the C:\Python27 folder (this is important).
Rerun the installer and it should work with no issues :-)
Please provide the environment you have installed.
if windows 2008 R2, because of the rights issue, you need to cancel the installation of pip, it is best not to install in C.
msiexec.exe /quiet /i python-2.7.10.amd64.msi ADDLOCAL=DefaultFeature TARGETDIR=D:\python27
I encountered the same problem. The reason is that Python-dependent system updates need to be rebooted before they can be configured correctly
Try Anaconda it has a lot of libraries already packaged in it. And it comes with conda : a package manager.
conda install my-package
And my-package is already installed.

Categories

Resources