Skip to main content

Greetings,

I am trying to add Python Librarys. However I am getting an error: Error in running the Python command 'python %0'.

I am using the command: 

fme.exe python -m pip install arcpy C:\Users\user\Documents\FME\Plugins\Python

The error log is:

INFORM: The user-specified Python interpreter `C:\Program Files\FME\fmepython38\python38.dll' is version 3.8 with PYTHONHOME `'
INFORM: Python version 3.8 loaded successfully
Processing c:\users\tmpgcesn\documents\fme\plugins\python
ERROR: Files/directories not found in C:\Users\tmpgcesn\AppData\Local\Temp\pip-req-build-g8zek1u9\pip-egg-info

Any suggestions to resolve this??

Thanks,

Clive

 

 

You can't really 'install' arcpy. You have to use the version of python that comes installed wiht ArcGIS to access the ArcPy functions


Like @hkingsbury​ said, use arcpy from the ArcMap installation. Steps to get it working:

  • Install ArcMap and make sure you have it licensed.
  • Use FME 32-bit. When you use FME 64-bit, install Background Geoprocessing (64-bit) to bridge the 32-bit 64-bit difference.
  • Start new workbench and set Python Compatibility (Navigator, Worspace Parameters, Scripting, Python Compatibility) to Esri ArcGIS Python 2.7
  • Add a Creator and a PythonCaller.
  • Open the PythonCaller.
  • Set Class to Process Features to processFeature
  • Add next script.
import arcpy
 
def processFeature(feature):
    pass

If this returns no errors you are good to go.


Like @hkingsbury​ said, use arcpy from the ArcMap installation. Steps to get it working:

  • Install ArcMap and make sure you have it licensed.
  • Use FME 32-bit. When you use FME 64-bit, install Background Geoprocessing (64-bit) to bridge the 32-bit 64-bit difference.
  • Start new workbench and set Python Compatibility (Navigator, Worspace Parameters, Scripting, Python Compatibility) to Esri ArcGIS Python 2.7
  • Add a Creator and a PythonCaller.
  • Open the PythonCaller.
  • Set Class to Process Features to processFeature
  • Add next script.
import arcpy
 
def processFeature(feature):
    pass

If this returns no errors you are good to go.

Hi Niels,

Thanks for the email.

I am using ArcGIS Pro, I selected the ESRI ArcGIS Python 3.7 option,

I also selected the Python 2.7 option.

 

I have arcpy under the ArcGIS Pro folder:

C:\Program Files\ArcGIS\Pro\Resources\ArcPy

 

I still get the arcpy doesn't exist error??

Thanks,

Clive


Hi Niels,

Thanks for the email.

I am using ArcGIS Pro, I selected the ESRI ArcGIS Python 3.7 option,

I also selected the Python 2.7 option.

 

I have arcpy under the ArcGIS Pro folder:

C:\\Program Files\\ArcGIS\\Pro\\Resources\\ArcPy

 

I still get the arcpy doesn't exist error??

Thanks,

Clive

Ah, when using ArcGIS Pro please doublecheck if you have the correct combination of software versions in the article "Notes on FME and Esri Versions and Compatibility".

So the current supported ArcGIS Pro version is 2.7.x and you need to use FME 2020.2.2 or higher.


Reply