Skip to content Skip to sidebar Skip to footer

Strange Permissions Problems For Virtualenv Python Executable (lubuntu-12.10)

In brief, my problem is that when I try to create a virtualenv using mkvirtualenv from virtualenvwrapper, I get the following error: $ mkvirtualenv test New python executable in te

Solution 1:

It turns out the problem was to do with how I'd mounted my shared partition. I'd mounted with (in /etc/fstab):

UUID=....  /home   hfsplus   auto,user,nodev,rw    00

However, the 'user' option automatically includes 'noexec' --- thus, after virtualenv had copied the system python binary to my home partition, it was unable to run because of the 'noexec' flag.

Changing my fstab to read:

UUID=....  /home   hfsplus    auto,user,exec,nodev,rw   0   0

solved the problem.

Solution 2:

I have had the same problem. I tried creating a virtualenv in my home folder and that worked fine, but I got that error when I tried to create one on a different partition.

So to fix your problem either try a different location or take a look at how stuff is mounted.

Solution 3:

As the other answers (thankfully) have already stated, it is a permissions issue. I resolved it by re-mounting the required drive with the correct exec permissions (as already pointed out). But I could not use @duncanm's anwer since I could not find my drive path in the /etc/fstab file.

I executed the following on my Ubuntu 14.04 and it did the job.

To unmount -

$ sudo umount /media/ashish/Work/

To mount back with correct permissions -

$ sudo mkdir /media/ashish/Work$ sudo mount -o exec /dev/sda6 /media/ashish/Work/$ cd /media/ashish/Work/

I figured out the /dev/sda6 part by looking at the properties tab in the file manager.

Solution 4:

I believe it is primarily a problem with exec permissions, as you have discovered. You might also work around this by creating the virtualenv in a subdirectory of /data or /sd-ext. I am working on multiuser support, which puts home directories under /data/home rather than just the one sd card "home directory".

Post a Comment for "Strange Permissions Problems For Virtualenv Python Executable (lubuntu-12.10)"