Skip to main content
Question

fme python pip install - error wrong python version


asablomberg
Contributor
Forum|alt.badge.img+7

I tried to install a python package in cmd, windows 10, but got error "This workspace requires a Python 2.7 interpreter". How do I make it use python 3.* instead? The same command worked for my colleague so something is wrong in my program setup. I have python 3 installed also.

 

 

C:\\Program Files\\FME 2022.2.2>fme.exe python -m pip install cron-descriptor --target C:\\Users\\as302\\Documents\\FME\\Plugins\\Python

ERROR : This workspace requires a Python 2.7 interpreter, but FME has removed Python 2.7 support starting with FME 2022.0. Please open the workspace in Workbench to change `Navigator > Workspace Parameters > Scripting > Python Compatibility' and update the Python code to be Python 3.x compatible

 

Failed to create Python interpreter for Python version keyword '%0'

Program Terminating

 

Translation FAILED.

9 replies

virtualcitymatt
Celebrity
Forum|alt.badge.img+35

Here is where you set the python that the workspace should be running with

image


asablomberg
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • March 28, 2023

I have python 3.10 there.


david_r
Evangelist
  • March 28, 2023

As long as you have some version of Python 3 that should suffice.

More info here: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Desktop/Workbench/Python-Compatibility.htm


virtualcitymatt
Celebrity
Forum|alt.badge.img+35
asablomberg wrote:

I have python 3.10 there.

Hmm, you should check here to see if you have something weird set in your fme optoins.image.png 

 


asablomberg
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • April 5, 2023
virtualcitymatt wrote:

Hmm, you should check here to see if you have something weird set in your fme optoins.image.png 

 

This also says python 3.10.


asablomberg
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • April 5, 2023
david_r wrote:

As long as you have some version of Python 3 that should suffice.

More info here: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Desktop/Workbench/Python-Compatibility.htm

Yes I do, ArcGIS Py 3.7.11

I also have Python 2.7 because of software we use that depend on it (for another year, then we can upgrade and toss py 2).


david_r
Evangelist
  • April 5, 2023
asablomberg wrote:

Yes I do, ArcGIS Py 3.7.11

I also have Python 2.7 because of software we use that depend on it (for another year, then we can upgrade and toss py 2).

I just tested the exact same command with FME 2022.2.2 (default installation) and it worked as expected:

imageIf you still have this problem, consider opening a support ticket with your FME reseller or Safe support.


david_r
Evangelist
  • April 5, 2023
virtualcitymatt wrote:

Hmm, you should check here to see if you have something weird set in your fme optoins.image.png 

 

Neither of these settings should be necessary for installing a Python module from the command line.


virtualcitymatt
Celebrity
Forum|alt.badge.img+35
virtualcitymatt wrote:

Hmm, you should check here to see if you have something weird set in your fme optoins.image.png 

 

I guess I assumed that if there was something wrong set in there then it would prefer loading the preferred python interpreter instead of the the one which came with FME. Perhaps an Environment variable is overriding something.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings