Hi I have seen a number of questions relating to this flowline of using ArcPro python with FME but I cant find a solution for my set up.
I have ArcMap 10.8 and ArcPro 2.6 installed in same environment
I am using FME 2021 64 Bit. I currently have a lot of workspaces set up to use acrpy for fme feature processing through the python caller. This whole flowline is working for fme and arcmap using 2.7 python.
I want to replicate my workspaces to run the same processes using ArcPro with python 3.6 . When I run my workspaces that include python callers I get the following error message immediately on startup
2021-10-05 00:39:12| 0.0| 0.0|INFORM|Using Python interpreter from `C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\python36.dll' with PYTHONHOME `C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3'
2021-10-05 00:39:12| 0.0| 0.0|INFORM|Python version 3.6 loaded successfully
Failed to import the site module
Error processing line 1 of C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\bind_cpu.pth:
Traceback (most recent call last):
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site.py", line 168, in addpackage
exec(line)
File "<string>", line 1, in <module>
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\despatch\\__init__.py", line 7, in <module>
from .despatch import set_optimal, set_cpu_type # noqa
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\despatch\\despatch.py", line 6, in <module>
from x86cpu import info
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\x86cpu\\__init__.py", line 6, in <module>
from ._version import get_versions
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\x86cpu\\_version.py", line 7, in <module>
import json
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\json\\__init__.py", line 106, in <module>
from .decoder import JSONDecoder, JSONDecodeError
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\json\\decoder.py", line 3, in <module>
import re
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\re.py", line 122, in <module>
import enum
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\enum.py", line 2, in <module>
from types import MappingProxyType, DynamicClassAttribute
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\types.py", line 171, in <module>
import functools as _functools
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\functools.py", line 21, in <module>
from collections import namedtuple
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\collections\\__init__.py", line 32, in <module>
from reprlib import recursive_repr as _recursive_repr
File "C:\\Program Files (x86)\\Python27\\ArcGIS10.8\\Lib\\site-packages\\reprlib\\__init__.py", line 7, in <module>
raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site.py", line 550, in <module>
main()
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site.py", line 532, in main
known_paths = addsitepackages(known_paths)
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site.py", line 320, in addsitepackages
addsitedir(sitedir, known_paths)
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site.py", line 207, in addsitedir
addpackage(sitedir, name, known_paths)
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site.py", line 178, in addpackage
import traceback
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\traceback.py", line 3, in <module>
import collections
File "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\collections\\__init__.py", line 32, in <module>
from reprlib import recursive_repr as _recursive_repr
File "C:\\Program Files (x86)\\Python27\\ArcGIS10.8\\Lib\\site-packages\\reprlib\\__init__.py", line 7, in <module>
raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.
I assume this is the culprit
File "C:\\Program Files (x86)\\Python27\\ArcGIS10.8\\Lib\\site-packages\\reprlib\\__init__.py", line 7, in <module>
How do I resolve this?
I have set the python interpreter and compatibility and PYTHONPATH but still have the same error
I have also set the arc compatibility as Pro
Do I need to change something in Python path environment variable?
I still want to be able to use FME, arcmap and 2.7 python in the same environment for the forseeable I just want to be able to switch between the python interpreters in FME for when I want to process using FME/Arcpro and python 3.6
I thought it would be easier than its turning out to be!
Thanks in advance
Ciara