Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Unable to run python files in terminal on Mac

I create a file and try run it in my terminal and get this error "/Library/Developer/CommandLineTools/usr/bin/python3: can’t open file ‘/Users/dcg/pb’: [Errno 2] No such file or directory"
I’m not sure why, as when I Cd and I’m in the correct directory. This is a my first time coding in python on this laptop. Any help appreciated. Thanks

I tried changing directories, creating new files, restarting pc. Nothing worked. I read online saying apparently its a problem with where python was downloaded.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Are you sure to point to the python file you created ?
/Users/dcg/pb isn’t a python file, you may be missing the .py extension in your command line prompt.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading