We have many analytics trained & developed in Python 2.7 version. Can we continue to deploy them in the Analytics Catalog using UI.
I tried to deploy one today, deployment got completed (though there was an error: ModuleNotFoundError: No module named 'pip.req'), i got an error while executing the analytics:
" Execution of analytic Tower15-OptimalPath-to-GoldenEff-DEMO2 returned an error. Execution of analytic Tower15-OptimalPath-to-GoldenEff-DEMO2 returned the error 400, Unable to execute analytic - class [Tower_OptmlPath_to_GoldenEff.tataChemical_PathToGoldnEff], method [get_data]. Cause: ModuleNotFoundError: No module named 'PredixModel_Tower_OptmlPath_to_GoldenEff' File "/home/vcap/app/Tower_OptmlPath_to_GoldenEff/init.py", line 1, in from PredixModel_Tower_OptmlPath_to_GoldenEff import tataChemical_PathToGoldnEff "
Catalog: https://dss-qa-new.predix-analytics-ui.run.aws-usw02-pr.ice.predix.io/ Name: Tower15-OptimalPath-to-GoldenEff-DEMO2 Analytic ID: 91ff1a5c-a756-4ee1-9258-81f20cc99114
Answer by Erwin Cabral · Jun 01, 2020 at 01:48 PM
@Sathya ,
Python 2.x has reached its End-of-Life starting January 2020. Late last year, we started seeing a lot of issues reported by customers during analytic builds for Python 2.7 (especially where the version is not specified in config.json). The python builds will pull the latest version which is no longer compatible with the rest of the libraries because they moved entirely to Python 3.x. These issues came up and the only proposed solution was to update their code to make it compatible to Python3.x.
The list of python libraries who moved completely to Python3 can be found in the page : https://python3statement.org/
Please refer to the link below for fixing code compatibility with Python3 : https://python-future.org/compatible_idioms.html
The existing Python 2.7 analytics currently deployed will continue to work as long as it is not re-deployed. When a new or existing analytic is deployed, it automatically uses Python 3.6.5 as its runtime and this is probably what’s happening in your case.
Based on just looking at the error message you sent, the issue appears to be related on how the relative paths differ from Python2 to Python3. Please refer to this link for details: https://python-future.org/compatible_idioms.html#imports-relative-to-a-package
@Erwin Cabral , Thanks much for your feedback. I have updated my analytic - now trained in Py3 and tried to deploy. I am facing an issue with Numpy package. In my training environment i have Numpy 1.18.1. So I mentioned the same in the config.json and deployed. But i can see the build pack only installs Numpy thats is <=1.15.1 (attached screenshot Numpy_version_Issue.png). Ideally the config.json should dictate the version of the library to be installed, but thats not happening in this case.
I believe because of the issue am getting an error while executing the analytic (screenshot: Analytic Execution errror) -- ModuleNotFoundError: No module named 'numpy.random._pickle'
Catalog URL: https://dss-qa-new.predix-analytics-ui.run.aws-usw02-pr.ice.predix.io/analytics/view/234fe7c1-605b-4c9d-84b9-89a361a5bfba Analytic ID: 234fe7c1-605b-4c9d-84b9-89a361a5bfba
Please share your feedback. Thanks in advance.
Hi @Erwin Cabral, Can you please share your feedback on the comment i added on 8th Jun 2020? Thanks in advance
Hi @Sathya , We have seen the issue and have pushed the latest bug fix in production US-West last week. Can you try again?
unable to invoke "text exploration" analytic 1 Answer
Analytics Catalog service giving Jedis connection error 1 Answer
Confirmation of Analytics V2 model flow and About Analytics Framework service 2 Answers
Is LP Solver service available on Predix 1 Answer
500 Error while Analytic Execution. 1 Answer