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

I'm on Windows command line.
I installed Jupyter via pip 3.
I got this error, I suspect its path.
'jupyter' is not recognized as an internal or external command,
operable program or batch file.
However when I run
where jupyter
It returns:
INFO: Could not find files for the given pattern(s).
Does this mean Jupyter hasn't downloaded properly? Because it seemed to be fine when using the pip3 command.

Use the command py -m notebook and the problem is sloved.

When you are installing Anaconda ensure to check the check boxes to add the path to env. This worked for me.

It could have two reasons:
Either Anaconda is not installed in Windows.
Install it.
Path for Anaconda is not set in Environment variable.
Open Anaconda Command Prompt, search for "where conda".
Results:
C:\Users\<loremipsm>\AppData\Local\Continuum\anaconda2\Library\bin\conda.bat
C:\Users\<loremipsum>\AppData\Local\Continuum\anaconda2\Scripts\conda.exe
Use : Path as "C:\Users\<loremipsum>\AppData\Local\Continuum\anaconda2\Scripts"
**Path is a sample one, use you own.

I'm also new to Python, but this is what I found.
Try installing using Anaconda, check Add Anaconda to my PATH environment variable.
The reason is because if it's not checked, or if you use pip 3, paths are not automatically added.
You may also choose to manually add the path in Setting - Environment Variables.

You need to add path,where Anaconda is installed,in the Environment variable.
In my case it's
C:\Users\zahid\AppData\Local\Continuum\anaconda3\Library\bin
C:\Users\zahid\AppData\Local\Continuum\anaconda3\Scripts

Even I was stucked with the same issue.
What I did was I searched for the jupyter path in the Anaconda Prompt using the command "where jupyter"
After that I got a path
Then I went to my Environment variables(you would get this thing when you would search for the same) and then specified the new path there.
And the problem was solved.

Go to start and search for Anaconda Navigator
Launch the program
Then in Home section you will see Jupyter Notebook then click on Launch
Hope this helps

Related

I'm trying to use "flutterfire configure" but I'm getting an error. Can somebody have an issue for me please? [duplicate]

I'm trying to install flutterfire_cli in my root project, so I typed this command:
FirebaseFirestore firestore = FirebaseFirestore.instance;
so after that, this is the output of my console:
PS C:\Users\PC\Desktop\eventually> dart pub global activate flutterfire_cli
Package flutterfire_cli is currently active at version 0.1.1+2.
Resolving dependencies...
The package flutterfire_cli is already activated at newest available version.
To recompile executables, first run `global deactivate flutterfire_cli`.
Installed executable flutterfire.
Warning: Pub installs executables into C:\Users\PC\AppData\Local\Pub\Cache\bin, which is not on your path.
You can fix that by adding that directory to your system's "Path" environment variable.
A web search for "configure windows path" will show you how.
Activated flutterfire_cli 0.1.1+2.
To fix the warning I added C:\Users\PC\AppData\Local\Pub\Cache\bin to my Path in system variables environnement. (but it does not work, I'm still getting the warning)
Next, I'm trying to generate the firebase_options.dart file as the documentation says using this command:
flutterfire configure
But I'm getting an error in the console:
PS C:\Users\PC\Desktop\eventually> flutterfire configure
flutterfire : The term 'flutterfire' 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.
At line:1 char:1
+ flutterfire configure
+ ~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (flutterfire:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Could anyone tell me what I am missing, why I am getting this error even if the Firebase CLI already installed on my machine?
Go through this doc very carefully: https://firebase.flutter.dev/docs/cli/
Step 1: Install Firebase CLI
Step 2: Install FlutterFire CLI with this command dart pub global activate flutterfire_cli
While doing this you must notice the following warning
Warning: Pub installs executables into C:\Users\PC\AppData\Local\Pub\Cache\bin, which is not on your path. You can fix that by adding that directory to your system's "Path" environment variable. A web search for "configure windows path" will show you how.
This means you need to add C:\Users\*username*\AppData\Local\Pub\Cache\bin into your System's environment path.
Step 3: Now flutterfire configure should work.
If still not working play with Firebase commands
For Mac -> Execute this command:
export PATH="$PATH":"$HOME/.pub-cache/bin"
Three 3 steps for getting it work on Windows:
Run this command:
dart pub global activate flutterfire_cli
Type env into Windows search and open Edit the system environment variables --> Environment variables --> System variables( the one on the bottom of the window) --> Double click on Path --> New and enter this:
C:\Users\PutHereYourUsername\AppData\Local\Pub\Cache\bin
flutterfire configure command should work now - close and open again command prompt or other terminal. Sometimes there is a problem with other editors and terminals where flutterfire configure still does not work. In that case open Command Prompt and it works there for sure.
As for me, I have done everything correctly and the command works if I run in the Windows command prompt, but it fails to work if I type the command inside the VS code terminal.
So I just killed the terminal and opened it again, then it works.
Or, you can try restarting your machine.
Even after adding C:\Users\PC\AppData\Local\Pub\Cache\bin to the path for me flutterfire would not work from the command line, the reason being that it actually instally a flutterfire.bat file.
So I use flutterfire.bat in the command line as of now and that is working.
For Linux/Ubuntu run this command in the terminal,
export PATH="$PATH":"$HOME/.pub-cache/bin"
Which you will also notice in the terminal when you run the command ↓.
dart pub global activate flutterfire_cli
Make sure you are your project directory
run this export PATH="$PATH":"$HOME/.pub-cache/bin"
For Linux/Ubuntu you should do the following:
Open your .bashrc file using the command "sudo nano ~/.bashrc"
Add export PATH="$PATH":"$HOME/.pub-cache/bin" to the end of the file.
Final you can source the file using "source ~/.bashrc"
It should now be able to recognize the file.
for macOS Monterey edit ~/.zprofile instead .zshrc
This was the hack i used to solve mine. I copied and pasted the C:\Users\PC\AppData\Local\Pub\Cache\bin in my folder search bar to enter the folder, note I could not find any folder called AppData, but when I pasted it on the folder search it did take me to the bin folder.
In the bin folder, you will find a file called flutterfire.bat. Copy and paste the flutterfire.bat file in the root of your project and then run the .\flutterfire configure command. Please do note the dot (.) and forward-slash (\). You need to add it to work.
for mac m1 , add
export PATH="$PATH":"$HOME/.pub-cache/bin" at the top of users/username/.profile , works on (monterey)
For me, even after I installed everything correctly, restarting my IDE(VSCode) did the trick.
Flutter command not found
Here is very easy instructions for adding something to your path on Mac, It solved my issues with Flutter and Flutterfire.
The export PATH="$PATH":"$HOME/.pub-cache/bin" did not work on my Debian machine!
I removed the first line #!/usr/bin/env sh from $HOME/.pub-cache/bin/flutterfire file and the flutterfire command worked properly.
Use command prompt.. not the vsc terminal
if you followed the right answer and still not working, you need to restart your computer

opening jupyter notebook in anaconda

When I tried to install Anaconda into my computer, the destination folder for my installation was "C:\Users\Lara Nguyen\Anaconda3". When I clicked "Next", there was a pop-up saying that "Error:'Destination folder' contains 1 space. This can cause problems with several Conda packages, and is thus disabled. Please install to a path without a space". After the installation, opened cmd and typed "Jupyter Notebook" but there was an error message saying that:"jupyter"is not recognised as an internal or external command, operable command or batch file.
Is there anyway I can fix this problem?
Looking at your path I am assuming you are using windows (I mention this so that other linux user do not refer this answer)
First of all it's clearly mentioned in the Anaconda installation documents that it is recommended to install to a path which does not have spaces
If you installed it correctly, did you register the anaconda path to the environment variable? If not then do that
The paths that you have to register will be something like this:
C:User\username\Anaconda3
C:User\username\Anaconda3\Scripts
C:User\username\Anaconda3\Library
Now run the anaconda prompt (not cmd) and just type the conda commmand
After typing the conda command if you did not get any error then you have successfully installed jupyter as well (You can cross check this by going to following location : C:User\username\Anaconda3\Scripts and searching for jupyter-script.py file)
now in anaconda prompt itself run the command jupyter notebook
if it still throws you error then I would strongly recommend you to reinstall Anaconda3 and follow the above steps correctly

ionic install fails on fsevents on Windows

I have tried to install ionic on Windows but installation has failed. What should I do?
I have tried more than 20 times but still I got the same problem.
Here I have attached the screenshot for this
Entered commands:
npm install -g cordova
npm install -g ionic
Note: this one windows server machine
My guess is that the NPM global path has not been added to your windows path.
These are the steps to try:
First verify that the command just installed can run. The output contains the full path to the command installed, just copy and paste it to the command line. In your case it might be something like this %APPDATA%\Roaming\npm\iconic -v
Lets assume that works. That means that the command was successfully installed and will run, now we need to add it to your PATH so you can run it from the command line.
Next, Press Windows key and type "path" and select "Edit environment variables for your account". From here. Add or append the path %APPDATA%\Roaming\npm to your PATH variable, and save the results.
Once it is on your PATH you can run it from any command shell window.
Next, start a new command shell (e.g., Windows+R, cmd, Enter) and then type the command iconic -v. Viola, it should work without requiring the full path to the script.
I'm doing most of this from memory so hopefully it's correct. But if it needs some tweeks, let me know and I'll update the answer.
For completness, this install didn't actually fail. The lines with fsevents are warnings. The fsevents package is only designed to work on Mac Unix so these warnings can be safely ignored.
As Suraj Rao mentioned, also see Nodejs cannot find installed module on Windows?.

How to set a default environment for Anaconda / Jupyter?

I have installed Anaconda for my Machine Learning course. I'm using it as IPython (Jupyter) notebook, in which we have lessons. OS is Ubuntu 14.04 LTS. Basically, I always run it from Terminal with:
jupyter notebook
I have created new environment called su_env from root environment (exact copy) with one package added. Now, I'm wondering: how can I set environment su_env as default one? I have dozen of notebooks so it's annoying to set up each time for every notebook the environment, in "web" GUI of Jupyter.
EDIT: I'm interested in a solution where you don't have to set environment before running notebook. My logic is that, somehow, automagically, jupyter sets root environment on its own while starting up. Because of that, I'm wondering is it possible to set some config file or something so jupyter sets su_env instead of root. Also, if you know that's not possible (and why), I would like to know that.
First activate the conda environment from the command line, then launch the notebook server.
For example:
$ source activate env_name
$ jupyter notebook
Note: This might only work with environments that were created from within Jupyter Notebook, not environments that were created using conda create on the command line.
In your ~/.bashrc, include the line:
alias jupyter="source activate su_env; jupyter"
This will condense the two commands into one, and you will activate su env whenever you call jupyter notebook or lab or whatever
Edit your bashrc and add source activate su_env then that env will always be active. To switch back to to root (or any other env) source activate env_name
You can use this on conda prompt:
conda activate env_name
jupyter notebook
source activate env_name gives me an error: 'source' is not recognized as an internal or external command, operable program, or batch file.

PhoneGap command not recognized

I have followed the directions on PhoneGap's website and installed PhoneGap using the command prompt on Windows. However, after it has installed I try to run the command 'phonegap' and I get an error saying that 'phonegap' is not recognized as an internal or external command, operable program or batch file. How do I fix this? Thanks.
You might need to add phonegap to your classpath variable, in order to let the prompt know where the phonegap .exe file is located.
Try writing the full path of the exe file, if that runs, then what I mentioned above should solve your problem.
EDIT
Just looked at the install page at phonegap.com (http://phonegap.com/install/). Very scarce on the information I would say.. But I still recommend investigating the above.
The Problem with enthronement variable for default path of your your current user. Follow the steps.
Click the Start menu and type "regedit" on the search box. This will launch the Windows Registry Editor program.
Enter to the following Registry entry: HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings
Select the "Enabled" entry in the right side window. If this entry is there, right-click and select "New" followed by "DWORD Value." Name the value "Enabled."
Right-click the "Enabled" entry and click "Modify."
Change the number in the "Value" box to "1." This will re-enable WSH.
close all opened cmd windows and open a new window.
Just try to run CMD as administrator. Hopefully that will solve your problem. This solved mine.
Even though this is a very old question, I'm going to post a solution that worked for me on Windows Vista/7/8. The problem is that by default the command prompt in which the npm command is run is not elevated. So launch a command prompt as administrator and then run npm command. If it is not elevated then the environment variables wont be set properly.
In windows 7 platform, when the latest version of phonegap (3.4) installed it hosts in path like this:
C:\Users\\AppData\Roaming\npm
Sometimes you should add this address to the PATH environment manually.
Go to System Properties-> Advanced -> Environment Variables
Select PATH variable from list and then edit it