0

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"

blueberrr
  • 63
  • 1
  • 7

0 Answers0