3

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?

2 Answers 2

2

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.

5
  • 2
    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
    Commented Feb 1, 2020 at 18:40
  • As far as it is known to me, you need admin previleges to create and copy something in root path Commented Feb 2, 2020 at 9:35
  • But it's in the users home directory?
    – Jon
    Commented Feb 2, 2020 at 12:47
  • 1
    try python3 -m venv /home/mypc....... replace mypc with the name of the your user. Commented Feb 2, 2020 at 13:07
  • 1
    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
    Commented Feb 2, 2020 at 13:21
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .