2

Ubuntu 18.04 LTS

I'm trying to allow users to create their own virutalenv for python3, however when trying to create said environment using a standard user account with this command:$ python3 -m venv ~/path/to/venv

I get this error: Error: [Errno 13] Permission denied: '~/path/to/venv'

~/path/to/venv is already created and is owned by the standard user. The permissions are 775. How do I fix this?

ankostis
  • 205
  • 2
  • 10
Jon
  • 43
  • 1
  • 1
  • 6

2 Answers2

1

try and run sudo python3 -m venv ~/path/to/venv.

sudo in Linux environment means super user do which basically means that you are giving a command with super user access.

Rohit Rawat
  • 111
  • 2
  • 1
    I don't want my standard users to need sudo privileges to able to do this. From my reading online, they shouldn't need it right? – Jon Feb 01 '20 at 18:40
  • As far as it is known to me, you need admin previleges to create and copy something in root path – Rohit Rawat Feb 02 '20 at 09:35
  • But it's in the users home directory? – Jon Feb 02 '20 at 12:47
  • try python3 -m venv /home/mypc....... replace mypc with the name of the your user. – Rohit Rawat Feb 02 '20 at 13:07
  • The problem resolved itself. As both commands work(I'm not entirely sure why). Just for refernce, when "~" (Tilde) is in a path name, it references the users home directory. Ie ~/ == /home/user. – Jon Feb 02 '20 at 13:21
0

The problem mysteriously resolved itself. Any user is able to create a virtual environment now after no apparent change.

Jon
  • 43
  • 1
  • 1
  • 6