简体   繁体   中英

Installing python packages in a central location

Hi my question is about the installation of python packages in a central location. I have many computers on my network and would ideally want to install python packages in only one location and have the packages available to all the computers . Is there a clean way to do this ?

I think it depends on the type of the packages.

Plain Python packages could be potentially installed to a network drive and reused on any device that has that location mounted. It would be then just the matter of adding this location to the PYTHONPATH (which can be done through environment variables or some local settings file in your application).

However cpython packages that need to be linked against other libraries (eg database drivers) would possibly not work as they are compiled against a specific library version and any difference across your computers would possibly cause them to break.

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