I need to change the kernel to point it to miniconda version of Python, but Jupyter Notebook shows only one "Python 3" under Kernel-> Change Kernel.
Any idea how to get Jupyter notebook to show the additional one installed?
You can have a look at this and install the required kernel
https://ipython.readthedocs.io/en/latest/install/kernel_install.html
If you want to manually configure (add) Python 2.7 environment, try this:
conda create -n py27 python=2.7
conda activate py27
conda install notebook ipykernel
ipython kernel install --user
Related
I have python 3.8.5 installed with conda (miniconda). Jupyter lab is installed in the 'base' environment. I created a project and its virtual environment (fibonacci-6zMY4jHo) with 'pipenv'. To add the fibonacci-6zMY4jHo as a kernel into Jupyter lab, I did the following:
activated fibonacci-6zMY4jHo:
pipenv shell
installed ipykernel:
pipenv install ipykernel
Added fibonacci-6zMY4jHo to jupyter lab:
ipython kernel install --user --name=fibonacci-6zMY4jHo
Next:I run jupyter lab from the base environmnet. The list of kernels shows fibonacci-6zMY4jHo, but when I select it, jupter is not able to connect to it.
Any idea what is wrong?
Has anyone found a way to successfully set up an environment for a jupyter notebook without having the full version of Anaconda installed on your system? I am using Miniconda and have been unable to use a conda environment with the jupyter notebook platform. Note that with Miniconda source activate myenv will not work.
I also tried using ipykernel which did successfully get an environment to appear in my notebook (via the command: python -m ipykernel install --user --name myenv). However, this environment is still made as a copy of my base environment. Commands similar to conda create -n test_env python=3.7 don't seem to be compatible with ipykernel unless I am missing something.
You don't need to run ipython from the environment you are adding.
Since you've got an environment with jupyter, lets call that Jenv.
go to your miniconda install location
Scripts/activate Jenv
conda create -n SomeOther_vEnv python=3.6.8 whateverPackagesYouWant
python -m ipykernel install --sys-prefix --name SomeOther_vEnv --display-name "foo"
Now jupyter when started from your Jenv should see "foo". You can't start jupyter from foo, but you can use it in a jupyter server started from Jenv. (unless whateverPackagesYouWant included jupyter of course)
I downloaded Anaconda on a PC. I would like to use TensorFlow and Keras. I know I have to use Python 3.6 and TensorFlow 1.0.9 (because of my code).
After installing Anaconda, I open my Anaconda prompt (in admin) and I put these instructions to create a new env:
conda create --name deeplearningaz python=3.6 anaconda
activate deeplearningaz
conda install theano
conda install tensorflow
conda install keras
conda update --all
I don't have any errors, but a warning about updating Conda version, and a few debug messages.
After that, I try to check if I'm using the correct version of Python, so I type (still in Anaconda prompt) and import keras (to see if it's ok):
python
import keras
Everything works perfectly fine.
Then I type quit() and type spyder (to open the Spyder from the env in Python 3.6).
Spyder opens, and if I type anything (import pandas, numpy et read a csv), then it crashes... for no reason (and no error).
After that, still in the Anaconda prompt, I try again to open Spyder and I get an error:
I don't get the problem, I try again and again to uninstall and install anaconda (and checking if my file was really delete). I didn't find...
I check the print(sys.path) and it looks like it's ok (but I don't see the env).
Does anybody have any idea?
I put here the conda info in the env (before the crash).
I don't use Spyder, but based on this discussion about how they don't really support switching conda envs yet, it sounds like currently the correct way to get Spyder to use a Conda env is to launch Spyder from outside the env, and then change the Python interpreter (Tools > Preferences > Python Interpreter) to point to the python located inside the env you wish to use.
Or if you really don't care about space, simply install a new Spyder instance in the env (conda install -n deeplearningaz spyder), and then you should be able to launch within the env without issue.
I have an existing Jupyter notebook and I need to execute it an anaconda environment. I add the conda environment to jupyter notebook by executing the following commands:
conda install ipykernel
python -m ipykernel install --user --name myenv
Now, I can create a new jupyter notebook under the conda myenv.
The problem is how to execute an existing jupyter notebook with myenv? I can do it by copying the content to a new one but is there any other method?
We have just change the kernel under kernel->change kernel
There is a lot of information available to run Jupyter Notebook with Anaconda but could not find any info to run Jupyter without Anaconda.
Any pointer would be much appreciated!
Basically the process is as follows:
pip3 install --upgrade pip
pip3 install jupyter
jupyter notebook # run notebook
Run a specific notebook:
jupyter notebook notebook.ipynb
Using custom IP or port:
jupyter notebook --port 9999
No browser:
jupyter notebook --no-browser
Help:
jupyter notebook --help
Answer from the following sources:
SOURCE 1
SOURCE 2
See Gordon Ball's Jupyter PPA, the most actively maintained Jupyter PPA as of this writing with support for both Ubuntu 16.04 and 18.04 (LTS).
Installation: It's a Ball
Thanks to Gordon's intrepid efforts, installation of Jupyter under Ubuntu trivially reduces to:
sudo add-apt-repository ppa:chronitis/jupyter
sudo apt-get update
sudo apt-get install jupyter
Doing so installs the jupyter metapackage, providing:
A standard collection of Jupyter packages published by this PPA, including:
Jupyter's core and client libraries.
Jupyter's console interface.
Jupyter's web-based notebook.
Tools for working with and converting notebook (ipynb) files.
The Python3 computational kernel.
The /usr/bin/jupyter executable.
As W. Dodge's pip-based solution details, the browser-based Jupyter Notebook UI may then be launched from a terminal as follows – where '/home/my_username/my_notebooks' should be replaced with the absolute path of the top-level directory containing all of your Jupyter notebook files:
jupyter notebook --notebook-dir='/home/my_username/my_notebooks'
Why Not Acanaconda or pip?
For Debian-based Linux distributions, the optimal solution is a Debian-based personal package archive (PPA). All other answers propose Debian-agnostic solutions (e.g., Anaconda, pip), which circumvent the system-wide APT package manager and hence are non-ideal.
Installing Jupyter via this or another PPA guarantees automatic updates to both Jupyter and its constellation of dependencies. Installing Jupyter via either Anaconda or pip requires manual updates to both on an ongoing basis – a constant thorn in the side that you can probably do without.
In short, PPA >>>> Anaconda >> pip.
There are two ways to install Jupyter-Notebook in Ubuntu. One is using Anaconda, the other using pip. Please go through the below added link for details.
http://jupyter.readthedocs.io/en/latest/install.html