Replies: 1 comment 1 reply
-
@jacobopt This should be filed as an issue. As a workaround you can create a virtual environment in your project using |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Posting to Github because I was directed here from Stack Overflow!
I have a user who is not able to get VSCode to recognise the Python executable from the Python path. We have set the default interpreter path to be the path of the executable in the extension settings, but it's still not working. We suspect the issue is to do with an apostrophe in the path, due to the name of the user containing an apostrophe.
The path of the executable is this:
C:/Users/BobO'Ross/AppData/Local/Programs/Python/Python312/python.exe
and the error message we get after trying to run a Python program is this:
The term C:/Users/BobORoss/AppData/Local/Programs/Python/Python312/python.exe c:/Users/BobORoss/Documents/test1.py' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
As you can see, the error message removes the apostrophe from the directory. It probably does this because it sees the apostrophe as a special letter. We have tried escaping the apostrophe in various ways e.g. by adding a backslash and a ` (whatever that character is called), but none of these seem to work.
We're not really sure what else to do.
Thank you in advance for your help.
Beta Was this translation helpful? Give feedback.
All reactions