Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyxel 'not recognized as the name of a cmdlet, function, script file [etc.]' error when trying to run any pyxel command in VSCode #572

Open
kaireinhold opened this issue Oct 16, 2024 · 4 comments

Comments

@kaireinhold
Copy link

kaireinhold commented Oct 16, 2024

I'm new to using Pyxel, and have been trying to get it to work for the past hour or so. I've done the pip install for Pyxel, and have a file with the pyxel module imported and such. I'm trying to follow Testing Coder's tutorial series on YouTube, but not much is explained issue-wise.

Edit: Here's a screenshot of my terminal in VSCode
Screenshot 2024-10-16 103523
I don't know why the 'pyxel run pyxel-main' command sent so many times either. I only sent it once. The terminal must have glitched.

@kaireinhold kaireinhold changed the title Pyxel 'not recognized as the name of a cmdlet, function script file [etc.]' error when trying to run any pyxel command in VSCode Pyxel 'not recognized as the name of a cmdlet, function, script file [etc.]' error when trying to run any pyxel command in VSCode Oct 17, 2024
@kaireinhold
Copy link
Author

After some searching, working out issues using the help of AI, and finding a workaround (the command 'python -m pyxel [pyxel command]') I have been able to get it to work to a point. If anyone knows how to get it to work without the workaround, please let me know - everything I've tried to eliminate the need for the 'python -m' part of the commands has not worked.

@merwok
Copy link
Contributor

merwok commented Oct 17, 2024

This is a generic setup issue, not specific to Pyxel.
I believe you need to do this step: https://realpython.com/python-coding-setup-windows/#changing-the-path-environment-variable (link to a specific section but the whole page is useful to read!
See also: https://docs.python.org/3/using/windows.html

@EurynomeKeros
Copy link
Contributor

  • Check the VSCode terminal settings to ensure the correct Python interpreter environment is selected
  • Check that the python interpreter environment is added to the Path system environment variable path\to\Python\PythonXXX\,path\to\Python\PythonXXX\Scripts\
  • Check the path\to\Python\PythonXXX\Scripts\ for pyxel execution files like pyxel.exe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@merwok @EurynomeKeros @kaireinhold and others