Python 3.8.1 installed, but IDE remind that 'Requested Python version (3) not installed'

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Python 3.8.1 installed, but IDE remind that 'Requested Python version (3) not installed'

2,047 次查看
zengfs
Contributor I

zengfs_0-1609833560605.png

I can check the python version in cmd, but IDE still remind me that the python3 was not installed.

0 项奖励
4 回复数

1,953 次查看
Xiang_Li
NXP Employee
NXP Employee

From the project setting, there is a post compiling command:

echo "${OsType}" | grep -q win* && py -3 "../scripts/dk6_image_tool.py" -s 294912 ${ENV_IMAGE_TOOL_OPTS} ${BuildArtifactFileName} || python3 "../scripts/dk6_image_tool.py" -s 294912 ${ENV_IMAGE_TOOL_OPTS} ${BuildArtifactFileName}

So clearly it asks for Python 3. Not Python 2.7. This is a good thing I think because python 2.x is phasing out.

I guess the documentation is not up-to-date because it still asks us to install 2.7.

As for you issue I have no clue too. The command asks for either "py" or "python3". But in your screenshot you only showed "python -v" Could that be somehow you only have python.exe but not python3.exe available in your environment?

0 项奖励

2,037 次查看
nxf56274
NXP Employee
NXP Employee

Hi,

 You should use python2.7. The syntax is little different.

2.PNG

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 days after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励

2,007 次查看
zengfs
Contributor I

I used python 2.7 at first time.

And I generated a firmware successfully, it can not boot up. I found that the dk6_image_tool.py script should work with python(3).

As I changed a computer to install the same IDE, SDK and python 3.8.1, everything works well.

0 项奖励

2,045 次查看
converse
Senior Contributor V

The script is running something called "py" not "python".

 

0 项奖励