cannot open .ipynb file even if ipython and jupyter is installed in my pc - ipython

I have installed ipython, jupyter etc using pip in my windows 7 pc. Now I want to open a .pynb file from command line. When I typed 'jupyter notebook' it is showing: 'jupyter' is not a recognized internal or external command ...... Can you tell where is the problem? Can't I open the file from command line or I have to install an IDE like 'pycharm' or 'anaconda'?

Please try the below command:
python -m notebook
This should work without anaconda.

Related

VSCODE terminal settings configuration

I am able to run streamlit and python on Anaconda cmd prompt on a separte window, but I can't get the streamlit to run on the VSCODE terminal (python runs fine). When I type in streamlit in the terminal, it generates a message saying
'streamlit' is not recognized as an internal or external command,
operable program or batch file.
I am guessing if I can get my VSCode terminal to run as Anaconda prompt, it should run streamlit without an error, as I am able to run streamlit on a separate Anaconda prompt outside of VSCode.
I am using Python 3.9.5 64-bit as my interpreter on VSCode and selected Command Prompt for my terminal option. I am on Windows environment.
I tried selecting Python 3.8.5 ('base') as my interpreter, but it threw the same message. Here is the image of the options I have for interpreter.
I had to create a new command prompt on VSCode that's using 3.8.5 ('base': conda) as my interpreter in order to successfully run streamlit!!

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

How to review the codes from .ipynb files in Mac OS ?

I have some code to review and the files have extensions of .ipynb in the end. I install IPython using the command sudo pip install ipython. Now, when I type ipython in the terminal, I get the return -bash: ipyhton: command not found.
What I could do now to review those files? Python is installed in the system. I read the I need to use the command ipython notebook file_name.ipynb to run those files from the terminal.

Add python 2.7 to ipython notebook (default python3)

I am having a really hard time adding python 2.7 as a kernel to my iphyton notebook. I have anaconda installed with a python environment called "python2." I can navigate to the environment folder and launch ipython (using python 2.7) in the script folder.
I have tried ipython kernelspec install-self using iphython.exe, however, it seems like ipython is not even a command in that window.
I tried it again in anaconda command window and it just install python3. Please help with precise steps.
Ok I got it. I had to:
Change my python.exe under envs to python2.exe. I also change pythonw to pythonw2.
Added Anacoda\envs\python2 folder that includes python2.exe and scripts to path variable
Then ran this command in Anaconda command window: python2 -m IPython kernelspec install-self
Then ipython kernelspec list to verify

Cannot start Canopy's IPython from Windows command shell

I have been using EPD for some time and recently started using Canopy. So now I have both EPD and Canopy installed on my machine, which runs Windows 7 Pro x64. But I just realized I cannot launch Canopy's IPython interactive session (located in the directory C:\Users\User\AppData\Local\Enthought\Canopy\User\Scripts) in a Windows command prompt. I already added this directory to my Path before the EPD's python directory.
I checked out those files in the directory .../Canopy/User/Scripts/, I believe that problem is not with the file "ipython-script.py" there, but with the file "ipython.exe", which is what will be run when I simply type "ipython" in a Windows command shell (I set the path already).
In a Windows command shell, if I changed to the directory .../Canopy/User/Scripts/ and type up "python ipython-script.py", then I can correctly start the IPython session in the command shell. So, it looks like that "ipython.exe" does not run the script "ipython-script.py"...
Has anyone run into this same problem? Is there an easy fix?
P.S. I already had the latest Canopy (version 1.0.1.1160) installed.
Thanks for any help.
If you want to launch web interactive then the command
ipython notebook in windows shell or in canopy shell works.