Reputation: 1401
I've installed python 3.7, but whenever I try and run a script in cmd, it says: Requested Python Version (3.7) is not installed
.
Now, I start my scripts with #!/usr/bin/env python3.7
, which just means that I don't have to write python3.7 in to cmd.
But, when I start my script with #!/usr/bin/env python
, the script runs perfectly fine on cmd. What does this mean? Is it not running my script in Python3.7?
Upvotes: 0
Views: 177
Reputation: 4489
#!/usr/bin/env xxx
looks for the first xxx
to appear in $PATH
.
You have python installed to the python
path and likely nothing for python3.7
which means that your script is running when you have it as python
and not for python3.7
because it doesn't know what to run when it can't find python3.7
in $PATH
. You could probably try python3.7.4
since that is your specific version and it might work but it all depends on how it was installed and setup.
If you wanted to make python3.7
work instead, you could look here and more information on this issue here.
Upvotes: 1