Skip to main content

Hi All, I have script written in Py3 in ArcGIS Pro 2.8, it uses pyodbc lib to connect to Non GIS SQL Server database. ArcGIS pro needs to be a cloned env.

 

I want to schedule this script as FME workspace (Ver 2021.2) using Python caller to run the script. The issue that I am having is that it’s not able to find the Cloned environment and not able to reach pyodbc library. I have implemented all the suggestions from this Safe Community Article.  

 

https://community.safe.com/s/article/choosing-a-different-python-interpreter-installati#SettingACustomInterpreterForDesktop

 

I am looking for some feedback on hoe to have FME Desktop point to the clone env. It points to the following path:  

C:\\Users\\testUser\\AppData\\Local\\ESRI\\conda\\envs\\arcgispro-py3

 

I need to update so that it points to the following path:

C:\\Users\\testUser\\AppData\\Local\\ESRI\\conda\\envs\\arcgispro-py3-clone

 

The error that I am getting is:

Python Exception <ModuleNotFoundError>: No module named 'pyodbc'

 

Appreciate any feedback.

 

Thanks

JS

Sharing the solution here as well in case it may help other users.

 

Follow the steps outlined for setting a custom Python Interpreter for Desktop in this article. For example, the select the python3x.dll in the root directory of the cloned environment and set Python home as the root of the cloned environment in the FME Options > Translation dialog.

 

Once this has been set, ensure the Python Compatibility parameter of the workspace to an FME Python 3.x option that is compatible with the cloned Python environment (eg. FME Python 3.7 with ArcGIS Pro 2.8). You should not set this parameter to an Esri ArcGIS Python 3.x option as FME will load ArcGIS' default Conda environment and ignore the custom interpreter settings from FME Options.


Reply