As mentioned in this link about how to install Jupyterlab with pip, I ran into some problems. The installation went fine as far as my command prompt is concerned. But when I try to run Jupyterlab using the command jupyter lab the following error message shows up:
Note: I tried to install Jupyter notebook using the guide provided in the above link (pip install notebook), it installed fine, but while trying to run the notebook using jupyter notebook, I ran into the same problem ('jupyter' is not recognized as an internal or external command, operable program or batch file.). But this post here solved this problem.
This is probably due to the shortcut you use for launching Jupyter redirecting to Jupyter Lab or something of such, you can check on how to stop the redirection here: python - How to set jupyter notebook to open on browser automatically - Stack Overflow
Similar problem. Working notebook environment on a remote server several weeks ago. Logged in and notebook initially would open but would not recognize the conda environments packages (could not import anything). Tore it down reinstalled everything and now jupyter notebook ... serves up a blank page.
The frustration for me is that notebook became an excellent environment to work in esp. with extensions. The lab environment is very kludgy by comparison eg. if I want to select a range of cells, clicking the left hand side of the first, say, collapses it! In notebook the cell (sensibly) remains visible. I could go on but really, jupyter lab and by extensions 7, are not up to the quality of the last notebook
I am using an python 3.8 in an offline regime. Namely, if I need some package to install, I'll go and download that package.whl or package.tar.gz and install using pip install package.whl. Once I wanted to install jupyter notebook and it required bunch of other packages to be installed. I patiently installed all that were necessary. At the end, I have the following trace:
I thought "now it'll work" but I was wrong, jupyter notebook command in terminal threw:'jupyter' is not recognized as an internal or external command, operable program or batch file.
I found jupyter notebook was not installed where I thought it was, and therefore my environmental variables needed to be updated. I found the jupyter.exe file C:\Users\\AppData\Roaming\Python\Python38\scripts. Once I added this to my environment variables I could run the jupyter notebook command. I also added C:\Users\\AppData\Roaming\Python\Python38\site-packages to my EVs incase there were any dependencies.
Once the Python Command Prompt opens up, install Jupyter Notebook by entering > conda install ipython-notebook. Jupyter Notebook used to be called iPython Notebook, but the project was renamed. While I do not know many details of the how or the why, searching for jupyter did not reveal anything, but searching for ipython did, so this is what we are going with.
This will open a command prompt window, and then a web browser tab in the default web browser. We need to leave the command prompt window open in the background, but it can be minimized since we really do not need to monitor what is going on. In the new web browser tab, we are now looking at a directory tree of our user directory on our machine.
Open a command prompt or terminal on your computer. For installation, we are going to use the pip command. And for installation, the pip should be upgraded. If you have the latest pip version, move directly to the next step. Or use the below command to upgrade your pip.
* To verify that PyTorch has been installed correctly, open a Python shell by typing python in the command prompt or terminal window. Once the Python shell is open, type the following commands:
After running this command, you will notice that a new file named Pipfile was created in your-folder. A Pipfile contains package information that represents a python environment. Open your terminal and make sure you are still in the your-folder directory; then, run pipenv shell. You have now activated your python environment, the environment that contains the arcgis package! You can run jupyter notebook or python in this environment to start using the API.
My problem could be that I have been installing pypdf2 from the Windows command level instead of from the Jupyter Notebook command level. But I cannot find out how to go to the command level within Jupyter Notebook. The following advice does not have any effect in the Jupyter Notepad home screen. " If you click on the prompt or output area of a cell you will enter command mode."
You could also running the install commands directly inside your Jupyter notebook by prefixing them with !, e.g. !pip install pypdf2, but there is no guarantee that actually works correctly, and could cause further problems.
If you are comfortable managing your own Python/Jupyter installation, you can just run jupyter notebook yourself in a terminal. To simplify installation, however, you can alternatively type the following in Julia, at the julia> prompt:
The first time you run notebook(), it will prompt you for whether it should install Jupyter. Hit enter to have it use the Conda.jl package to install a minimal Python+Jupyter distribution (via Miniconda) that is private to Julia (not in your PATH). On Linux, it defaults to looking for jupyter in your PATH first, and only asks to installs the Conda Jupyter if that fails; you can force it to use Conda on Linux by setting ENV["JUPYTER"]="" during installation (see above). (In a Debian or Ubuntu GNU/Linux system, install the package jupyter-client to install the system jupyter.)
from the command line (the Terminal program in MacOS or the Command Prompt in Windows). Note that if you installed jupyter via automated Miniconda installer in Pkg.add, above, then jupyter may not be in your PATH; type import Conda; Conda.SCRIPTDIR in Julia to find out where Conda installed jupyter.
Instead of running the classic notebook interface, you can use the IDE-like JupyterLab. If you are comfortable managing your own JupyterLab installation, you can just run jupyter lab yourself in a terminal. To simplify installation, however, you can alternatively type the following in Julia, at the julia> prompt:
The resulting notebook will be save to the custom-name.ipynb file at /custom/path/. Please notice that in the command line there is no file extension in the --output parameter (just custom-name, not custom-name.ipynb).
What if you would like to share executed notebook with others? You can execute the notebook and save output into PDF or HTML format. Additionally, you can hide code in the final notebook. The example command that will execute notebook and save it as HTML file with code hidden.
There are many ways in which you can execute Jupyter Notebook in terminal. The nbconvert tool provides many options for exporting notebook to different formats, like PDF or HTML. It can be used to hide code in out notebook. The papermill framework allows to easily parameterize notebooks. You can convert notebook to .py file and execute it as plain Python script. It can be done manually or with jupytext package. I hope you will find your way for running Jupyter Notebooks in the command line.
On Mac OS X, create a Desktop folder with the Finder called my-notebook. In the last section, we learned how to start the OS X Terminal. Launch the Terminal again so that we may start Jupyter. Change to that directory (i.e., open the newly created my-notebook folder) with the cd command: cd /Desktop/my-notebook. The character is a shortcut to indicate you are at your home directory.
On Windows, create a Desktop folder called my-notebook. Hold down the shift key and right-click on the newly created folder. A context menu will appear and there will be an option to, "Open command window here". Click this option to launch the Windows Command Prompt at that specific location.
This project includes a series of Jupyter notebooks for learning Python with geoscience objectives. They are located in the notebooks folder in the git master branch. In order to clone this project or any projects containing Jupyter notebooks such as the Unidata Python Workshop, please see the section on git and github. Once you have cloned your repository, change directory to where the Jupyter notebooks are located in the repository folder (e.g., the notebooks directory) and start Jupyter with the jupyter notebook command.
To open Jupyter Notebook from the command prompt, you need to have Jupyter Notebook installed on your computer. If you have already installed Jupyter Notebook, you can open it by following these steps:
NOTE: You can also shutdown a Jupyter Notebook session by clicking in the Terminal window and clicking Ctrl+c. You will be asked to confirm that you want to Shutdown this notebook server (y/[n])?. Type y and hit Enter to confirm. Then, you can close the Terminal by typing the command exit and hitting Enter.
Let's test if python installed successfully, open command prompt and type "python". If python is installed correctly then you should able to see the python version number and some key help, as shown below in Fig 6.
Bam! You have installed Jupyter Notebook. To check whether the installation is successful or not, and run the Jupyter Notebook, run the following command in the Anaconda prompt or command prompt (Windows) or terminal (Mac/Linux).
Upon executing the above command, the terminal or command prompt will print some information about the Jupyter Notebooks being loaded. It might look something like as shown in the below snapshot. Be mindful that the information printed would be different for each workstation.
Now, let's understand how Jupyter environment works, I won't be going technical, though. As the Jupyter Notebook is a web application, it works on a server-client architecture. When you execute the command jupyter notebook, the Jupyter software starts the server locally in the console where the command is executed, and the Jupyter Notebook homepage that opens in the web browser works as the client. Whatever you perform, that is, create or upload a new notebook, or save the existing one, the client notebook on which you are working, will keep communicating with the server running in the console/command line.
df19127ead