I need to import a custom Python module (pyinaturalist) in ArcGIS Pro.
I created a copy of the base Python environment in the Conda Manager within ArcGIS Pro, but I did not find the module I need in the list of available modules.
I tried the suggestions on this site; however,
myPythonModules = r"C:\Users\Manuel\Python\lib\site-packages\pyinaturalist"
sys.path.append(myPythonModules)
import pyinaturalist
just produced to this error:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
In [3]:
Line 3: import pyinaturalist
ModuleNotFoundError: No module named 'pyinaturalist'
--------------------------------------------------------------------------
the other suggestion, to add the line
import sys; sys.path.append(r"C:\Users\Manuel\Python\lib\site-packages\pyinaturalist")
to Program Files > ArcGIS > Pro > bin > Python > envs > arcgispro-py3 > Lib > site-packages > ArcGISPro.pth
was also not working.
So how can I import custom modules and use them in ArcGIS Pro?
Solved! Go to Solution.
pip install pyinaturalist
is how they said to install it. pip comes with your conda distribution
pip install pyinaturalist
is how they said to install it. pip comes with your conda distribution
Thanks, I didn't know I could just run pip install from the Python Command Prompt since the explanations suggested all these other things. (Also, I rarely use Windows and would usually activate a virtual environment from a regular Terminal and then use pip install (I haven't found a way to activate the environment from the Windows Command Prompt and hence gave up on that route))
Hi,
and how can I getting import working without pip install?
you don't, the package is created during the install process. If you have access to another machine you could give copying the distribution folder in site_packages folder to your machine. They don't distribute wheels either.