Command Line - Parameter format not correct - for python 3 project Reggie's Linear Regression

Hello,

I am working on step 4, navigating to the directory containing the project, to type into the jupyter notebook. I am using windows 10 and have Jupyter 4.4.0 installed.

I am stuck at navigating to the correct folder in the directory.

I get the following error in the terminal when I am trying to access my pyth folder where I have a folder for the project.

code used:
C:\Users>dir Desktop/pyth/reglinreg

error:
Parameter format not correct - "pyth".

A note would be that the file path would be This_PC/Desktop/pyth/reglinreg

pyth is a folder on the desktop

reglinreg is the project folder I will be working in for reggies linear regression, it is located in the pyth folder

Link to Exercise:
https://www.codecademy.com/courses/learn-python-3/informationals/python3-reggies-linear-regression

Thanks!

Not being a Jupyter user I can’t say, but even the version from the Python home page has a scripts folder that can act as our workspace root folder. Is there a similar folder in the Jupyter install? If so then make that the root of your workspace. Create whatever folders you need in there. That’s the best place since it doesn’t involve a lot of messing with paths. Everything is aligned to the agents we have working in our environment.

1 Like

The use of the dir command suggests you’re using the windows command line shell but you’re using / path separators whereas windows would be \ (note the difference between your prompt and the path you typed out).

Edit: I think you may also be missing your username directory in that path too. C:\Users\my_username\Desktop

1 Like

TigerT thank you again! I am a dyslexic coder. I was getting still getting an error on everything I tried. The error was The system cannot find the path specified. . What ended up working was clicking the file path carrot in the folder directory and copying that into the windows command line following dir command. I will also add that there was a hidden “onedrive” path that was only revealed by clicking the carrot in the folder directory ( carrot = > ) . I am adding this explanation for the thread for others to reference in the future.

Thanks TIgerT!

Ok, thank you, I am a little uncertain by the last sentence when you say everything is aligned to the agents we have working in our environment, thanks mtf. I’m not sure what the agents would mean in this case.

1 Like

The agents would be Jupyter and Python, and anything else involved system related. The agents are the stuff we didn’t write but that are running.

A browser is a user agent.

1 Like

Tiger T, follow up question, I can get into the directory now but when I am going to open the jupyter notebook by typing jupyter notebook per the instructions I get the following error:

Error executing Jupyter command 'notebook': [Errno 'jupyter-notebook' not found] 2

I’ve tried several other command combinations

jupyter_notebook
\jupyter notebook 
$jupyter notebook

I get the following error:

'\jupyter_notebook' is not recognized as an internal or external command,
operable program or batch file.

None of the combinations seem to work.

This is the link to the lesson: https://www.codecademy.com/courses/learn-python-3/informationals/python3-reggies-linear-regression

I am on windows 10 using the command prompt and have installed jupyter notebook 4.4.0.

Thanks!

Hmm. It seems to recognise jupyter as a command but not notebook as a subcommand which is a little odd and suggests the install might have some problems.

Does python -m notebook work or does it throw an error?

Try listing the installed packages for a sanity check (either conda list or python -m pip list) and consider re-installing the notebook and perhaps some of the other jupyter packages.

What you need to start testing can vary a little depending on how Python was installed. Did you use conda or the basic python install (from python.org)?

When it came to installing Jupyter how did you do that (conda or pip)?

Hey Tiger,

I re-downloaded and installed the conda package and python.

running python -m notebook

throws the error Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

running python -m pip list

throws the error

Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

running conda list

throws the error

 'conda' is not recognized as an internal or external command,
operable program or batch file.

I am using the command line on windows 10.

I installed both conda and python from python.org.

I reaffirmed that there was a correct install of the Jupyter Notebook from Conda.

I tried to execute the command in Conda Prompt navigating to the dir path
I opened the browser tab for jupyter notebook but didn’t get much further

when i tried to recreate opening the notebook with jupyter notebook in conda prompt

it throws the error jupyter notebook

'jupyter' is not recognized as an internal or external command,
operable program or batch file.

Is that anaconda or miniconda which you installed?

The clearest guidance I’ve seen is the anaconda docs themselves which show how to open the anaconda prompt and then run those commands (the whole page is quite useful)-
https://docs.anaconda.com/anaconda/user-guide/getting-started/#optional-launch-spyder-or-jupyter-notebook-from-the-command-line

1 Like

Hey Tiger,

Its anaconda 3.

The “optional” bit near the bottom should have the instructions needed to run these programs with the anaconda prompt instead of the navigator GUI. If that’s not working then I’m afraid I don’t know how to fix it.

Only thing I can think of is to run conda list to double check the correct packages are installed in the current environment.

Hi Tiger T, Just wanted to report back in - i had to take some time away due to frustration but I didn’t give up and I eventually uninstalled everything and re-installed multiple times and went from a 32 bit to a 64 bit and watched the tutorial and got it to work. I also used the conda command prompt in the end instead of using windows.

For anyone with a similar issue on this lesson:
I used conda 3 cmd.exe program. The big clue to uninstall and re-install was the fact that the jupyter notebook wouldn’t launch from the correct directory.
Also don’t forget to double check the file path in case you are using a onedrive and use command dir to navigate to the file path. Once you are in the correct directory simply type in jupyter notebook and it should launch a new tab with Jupyter notebook. From there you can navigate to your correct filepath - if you are on a newer windows you may have to go through onedrive and select the correct Reggie_Linear_Regression_Skeleton.ipynb

Thanks Tiger T for the help.

If anyone else is reading this, don’t give up, you can do it, if I can do it. I think that perseverance or grit is the most important thing about coding.

1 Like