Select to view content in your preferred language

How do clone an environment for all to use

195
1
05-09-2024 10:24 AM
Labels (1)
ShariF
by
New Contributor III

I have a stand-alone python script that is used in a toolbox, a script tool. It requires ReportLab which is a python package that must be added to a cloned version of the default environment. It works on my installed version of ArcGIS Pro but when my coworker ran it we got the error that ReportLab package was missing. 

Ideal situation --> anyone in our organization could open this ArcGIS Pro project and use the script tool. 

Is there a best practice to save a cloned environment so my ^^ideal situation^^ could become reality? 

0 Kudos
1 Reply
Luke_Pinner
MVP Regular Contributor

You could just download and extract the package from pypi and then copy the "reportlab" directory (the one that contains __init__.py) to the same directory as your script. Or you could put it somewhere else and append the parent dir to sys.path in your script (i.e save it to somedrive:\\somepath\reportlab and then sys.path.append(r"somedrive:\\somepath").

0 Kudos