Question

fme python pip install - error wrong python version

  • 28 March 2023
  • 9 replies
  • 18 views

Badge +6

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

Userlevel 4
Badge +26

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

image

Badge +6

I have python 3.10 there.

Userlevel 4

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

Userlevel 4
Badge +26

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 

 

Badge +6

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.

Badge +6

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).

Userlevel 4

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.

Userlevel 4

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.

Userlevel 4
Badge +26

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