Operation not permitted , virtualenv

Viewed 1130

I am trying to create a virtual environment but it shows this error

PermissionError: [Errno 1] Operation not permitted: '/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/bin/python3.8' -> '/storage/emulated/0/my/bin/python'

Operation not permittedenter image description here

1 Answers

I had this error when I was working in an Oracle VirtualBox running Linux Mint 19.3 when I wanted to create a Python virtual environment with

python -m virtualenv -p python3.7 testname 

-->

OSError: [Errno 1] Operation not permitted

Same with sudo. It is because I use a shared folder on the Windows disk (VirtualBox allows this). From Linux terminal, I can also create a dir and a file in that shared Windows disk folder, thus it is not a question of write rights. Solution: I simply have to switch to a folder that was not shared. It should not be a VirtualBox shared folder.

I can share a pure data folder, but I should not share a program's folder (with one part on Windows, one part on Linux in my case), a program should not be split over disks. And that is happening if you install a Python venv to the Windows disk which is accessed by the Linux disk's Python program. You could see large parts of the venv files as data, but it would have to be fetched from another place, which is probably forbidden by the Python 3.7 main installation. It is a general thing, not just regarding Python.

Related