'python3' is not recognized as an internal or external command, operable program or batch file

后端 未结 8 728
猫巷女王i
猫巷女王i 2020-11-29 00:07

I am using Python 3.5.2 version on Windows 7 and tried using python3 app.py. I am getting this error message:

\'python3\' is not recognized as an         


        
8条回答
  •  渐次进展
    2020-11-29 00:44

    Yes, I think for Windows users you need to change all the python3 calls to python to solve your original error. This change will run the Python version set in your current environment. If you need to keep this call as it is (aka python3) because you are working in cross-platform or for any other reason, then a work around is to create a soft link. To create it, go to the folder that contains the Python executable and create the link. For example, this worked in my case in Windows 10 using mklink:

    cd C:\Python3
    mklink python3.exe python.exe
    

    Use a (soft) symbolic link in Linux:

    cd /usr/bin/python3
    ln -s python.exe python3.exe
    

提交回复
热议问题