Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Am I writing the cmd line correctly? I am trying to open a .py file with Anaconda..
I'm trying to open a .py file with Anaconda, as shown in the Machine Learning video but I can't figure out why it cannot find the path I'm putting in.
This is my cmd prompt and I know that the .py file is in the machine learning folder. Do I need to do '...' before or what? I am lost!
Steven Parker218,654 Points
The "cd" command is only for directories, but this path is to a Python file. Also, I noticed that your prompt has backslashes instead of slashes — so you probably need Windows-style backslashes for separators instead of the Linux style slashes used in the workspaces:
So if you want to change the working directory, use just the directory part of the path:
Or, if you want to open the file from where you are:
I also eliminated the "~/" prefix since you are already in a folder along the path.