Can I install Python/site packages on a LAN server?

2263
1
04-07-2016 08:03 AM
DevonCanady
New Contributor II

I'm going to be sharing an ArcGIS script tool with coworkers and I want to store all necessary mxds, gdbs, and script files in one folder on the server so the file paths are absolute. However, the script will also be using a couple site packages (PyPDF2 & ReportLab). Would I have to install the site packages on each user's lib directory or can I install them (and Python) on the LAN server?

0 Kudos
1 Reply
Luke_Pinner
MVP Regular Contributor

You can install them to users computers in the usual way or put them in the same folder as the script and python will find them automatically or you can put them anywhere you like and tell python where to find them at runtime using sys.path.append('path/to/parent/folder') before you import them.

If the 3rd party packages contain compiled binary libraries, ie. pyd or dll files, you'll probably need to do some os.environ['PATH'] manipulation as well.