简体   繁体   中英

Installing Python on a network drive for users with no write access

I am wondering if it is possible, without any problems, to have Python installed on a network drive for use by multiple Windows users who have only read and execute rights. As far as I know, it is possible to add the python binaries to the PATH variable and run python on another drive without any problem, but I was wondering some things :

  • I know you can install Python on another drive than your C: drive, but not sure if the same is possible with a network drive.

  • Can this support concurrent users? Like two people running python scripts at the same time.

  • Would users with no write privileges still be able to install python modules? I want only users with write access to the drive to be able to do this.

  • Would this pose any problems with some modules?

Thanks.

I'm a Linux user so can't test, but this seems like a common question and google finds lots of similar questions with answers

to answer your questions to be best of my ability:

  1. it should certainly support "concurrent users", the file server wouldn't even know the program is running, it'll just see devices on the network opening/reading the files
  2. users obviously wouldn't be able to install things on network drives if they don't have write permission, but they should still be able to install modules locally (ie on their own machine) with something like pip install --user requests
  3. I'm sure this would cause problems with some modules, but I wouldn't expect it to be many. note that lots of modules have issues running under OSs that they weren't developed/tested in, and a lot of Python work happens on Unix/Linux/OSX machines

If you want everyone to have the same development enviorment: Try creating a python virtualenv on the remote folder,so they can activate it when its required. https://virtualenv.pypa.io/en/stable/

But if want you want to do is to distribute an app and want everyone to have the same python, may be take a look at pyinstaller 'An application to convert python scripts into stand-alone binaries'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM