How to make a virtual environment on a flash drive? Even under sudo says

wolf@wolf-pc:/media/C47D-5F53$ sudo virtualenv django New python executable in django/bin/python ERROR: The executable django/bin/python could not be run: [Errno 13] Permission denied 
  • one
    Offhand - mount without noexec . cat /proc/mounts | grep -F /media/C47D-5F53 cat /proc/mounts | grep -F /media/C47D-5F53 sudo mount -o remount,exec /media/C47D-5F53 - drdaeman
  • Does not help. Again writes about the lack of rights - LiGhT_WoLF
  • In order not to stray in guesswork ... What is the first command (which “ cat ... | grep ... ”) gives out? FAT / NTFS does not have POSIX rights and, accordingly, executable bit. As a rule, its system puts on all files, but sometimes vice versa. This is determined, if I remember correctly, by the parameters umask and fmask . Accordingly, you can try something in the spirit of mount -o remount,umask=000 /media/C47D-5F53 . - drdaeman
  • wolf @ wolf-pc: / media / 1A2C-5AB1 $ cat / proc / mounts | grep -F / media / 1A2C-5AB1 / dev / sdb1 / media / 1A2C-5AB1 vfat rw, nosuid, nodev, relatime, uid = 1000, gid = 1000, fmask = 0022, dmask = 0077, codepage = cp437, iocharset = iso8859-1, shortname = mixed, showexec, utf8, flush, errors = remount-ro 0 0 - LiGhT_WoLF
  • virtualenv uses symbolic links to the python version, packages, and other tools. Offhand, you just have fat32 on a flash drive, which simply does not support symbolic links. Try formatting in ntfs or ext. But most likely the next problem that you encounter will be inoperability on other machines (since symlinks will point to nowhere). - FeroxTL

1 answer 1

Use ext4 file system. Format your USB flash drive via any Linux:

unload it first:

 umount /dev/sdb1 

further format:

 mkfs.ext4 /dev/sdb1