OS error permission denied attempting to install opencv-python on linux - python

I am using a mixed nodejs python app in replit(I know I know, please try to avoid hating on replit too much, I need to use it), but I am failing to install opencv-python due to the following error:
pip3 install opencv-python
Collecting opencv-python
Using cached opencv_python-4.7.0.68-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Collecting numpy>=1.17.0
Using cached numpy-1.24.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
Installing collected packages: numpy, opencv-python
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/nix/store/h4h5rxs0hzpzvz37yrwv1k2na1acgzww-python3-3.9.15/lib/python3.9/site-packages/numpy.libs'
Consider using the `--user` option or check the permissions.
What I have attempted:
"chmod 755 [the python file].py"
"pip install --user opencv-python"
using both pip and pip3
My python version is:
3.9.15
I have a package.json and a yarn-lock only, from the nodejs app, so I suspect maybe python cant add stuff to those files? Though that doesnt seem at all related to the error so probably not.
Repl.it runs on linux OS.
Sudo is also not a viable command on replit, nor is cmake. Replit issues.
I just tried using a virtual environment, I had no success. After installing opencv on virtual environment, when I try to use import cv2, I get "no module named cv2"

Related

pip install pygal_maps_world

Setup:
PC Windows 10 -- Have administrator rights
Python version 3.10.8
pip version 22.3
cmd used:
pip install pygal_maps_world
I am trying to pip install pygal_maps_world (have tried multiple variations of pip install) and constantly get:
ERROR: Error [WinError 5] Access is denied while executing command python setup.py egg_info
and
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied
Check the permissions
I can install other packages using pip, just not this particular package.
Any suggestions on how to get around this error?
Attempted: I have tried multiple variations of pip install following suggestions on here and other sites, and this is the only package I have not been able to install using pip. As I need it to complete some work, I need to install it.
Expected: pip install should install this like any other package

Python, pip install stuck on collecting "module_name"

Using freshly installed python 3.5.2 on windows 10, trying to install libraries via cmd, gives such result:
C:\Python35>pip install theano
Collecting theano
C:\Python35>pip install numpy
Collecting numpy
C:\Python35>pip list
pip (8.1.1)
setuptools (20.10.1)
C:\Python35>
The question is simple, how to make pip to install?
About trial and error. I did try to find solution, yes, and here is what does not work:
Using --no-cache-dir
pip install numpy-1.16.1-cp37-cp37m-win_amd64.whl same for Theano
python -m pip install and every special combination of parameters like pip3 -vvv and so on.
manually deleted the contents of the cache directory
ran as administrator, launched cmd from python folder
reinstalled python, restarted pc, have internet connection

Environment error while trying to install Pillow for Python on my Mac?

I get this error when I try to install Pillow using the terminal:
pip install pillow
Collecting pillow
Downloading https://files.pythonhosted.org/packages/7e/bb/d502ae951099ce9a5a20dec21e577f304b7706321f83205c5215ebc028cd/Pillow-5.4.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.7MB)
100% |████████████████████████████████| 3.7MB 1.3MB/s
Installing collected packages: pillow
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/Pillow-5.4.1.dist-info'
Consider using the `--user` option or check the permissions.
What can I do to avoid this error and successfully install Pillow?
The message that you are getting is saying that your user doesn't have permission to edit files where it is attempting to store the module files. Pip is a program that lets you install different python modules. When it runs, by default it will run as you and if you don't have permission to save to that location, it won't. sudo is short for Super-User Do which runs pip as a Super-User which has all the permissions necessary to save to that location.

cmd pip displaying errors whenever I try to install pygame

I am on a windows 10 system, and I recently installed the latest version of python python 3.7.0. I enable the PATH and tried to install pygame through CMD.
I first type in pip, that works as normal.
I then try pip install pygame
Now, this is where the problem arises.
CMD comes up with this:
Collecting pygame
Using cached https://files.pythonhosted.org/packages/b0/30/4df62b0eb0f09a8ad1c329ff5479b3b115e8dce25475fd0c2f73cb790aa4/pygame-1.9.4-cp37-cp37m-win32.whl
Installing collected packages: pygame
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python37-32\\Lib\\site-packages\\pygame'
Consider using the `--user` option or check the permissions.
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
So I type in python -m pip install --upgrade and then this happens:
Collecting pip
Using cached https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 10.0.1
Uninstalling pip-10.0.1:
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python37-32\\lib\\site-packages\\pip-10.0.1.dist-info\\entry_points.txt'
Consider using the `--user` option or check the permissions.
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Why is it doing this?
Somebody please help me and thank you in advance.
"Access dienied" means that you don't have enough permissions to change the global setup of your Python installation.
Either open a cmd line with Adminstrator permissions, or better: learn how to use Python virtual environments: https://docs.python-guide.org/dev/virtualenvs/

pip not installing scrapy after previous attempts on windows

I tried to install scrapy and other modules using pip and they failed to do so ,it using cached files from previous installations that i tried to install but the failed.How do i resolve this problem please. I'm running windows on my machine
The cached files are broken. Try to disable cache by --no-cache-dir

Categories

Resources