In Python2.7 all my visual scripts were running fine. When I use Python3.5 I get the error message:
get_ipython().kernel.comm_manager.register_target('glow', GlowWidget)
AttributeError: 'NoneType' object has no attribute 'kernel'
When I google the error message people say that you should use the jupyter notebook. But is it possible to run my old scripts without jupyter?
you should install ipython and Jupyter Notebook, as following
sudo apt-get install ipython ipython-notebook
pip install jupyter
And then you can use jupyter notebook in the terminal to start your notebook, from where you can create a new vpython notebook in your browser.
create vpython
and then you can write your vpython script and see the objects you created as following.
draw a sphere
also you can refer to other blogs to install your jupyter notebook and so on. But make sure that you have installed vpython.
Related
I have my VS code setup with Python and I also can run Jupyter Notebook Kernel inside of VS Code as well. Now when I Try to pip install folium on the same it give me ModuleNotFoundError.
How can I properly setup folium inside Vscode ?
Command I used to install
pip3 install folium
also folium shows up when I run python -m pip list
I ran the following command on the Jupyter Notebook Cell to fix the issue.
%pip install folium
% makes sure you're installing it in the right environment while doing it through Jupyter Notebook itself.
I'm using Ubuntu, installed Vs Code and anaconda. I've also installed python extension in VS Code, which brings Jupyter Notebook extension. Now, whenever I'm trying to run code from the Jupyter extension, its throwing error as if it requires ipykernel.
Now, my conda 'base' environment has already ipykernel. Why cant Jupyter extension look for ipykernel from the current activated environment?
Is there any explicit settings to be made, to make VS Code Jupyter extension use ipykernel from the current active environment? Please provide it.
Click here to switch the environment of Jupyter Notebook.
Possible solution python -m ipykernel install --user --name=conda_env_name
I've hit a dead end trying to solve/debug this issue which doesn't seem like it should be that difficult.
I'm working in Pycharm IDE (not the professional) and I'm working inside a virtual environment let's call it pythonProject and I want to be able to run launch a jupyter notebook in this environment so that it can pick up all the python packages i've installed and configured for this environment.
As I understand it from the documentation, these are the steps I need to take.
My terminal prompt statement:
(pythonProject) oliver#oliver-u20:~/pythonProject$
commands:
python3 -m pip install ipykernel
python3 -m pip install notebook
python3 -m ipykernel install --user --name pythonProject --display-name "Python (pythonProject)"
jupyter notebook
But when I load jupyter notebook, it only shows python3 under kernels.
I tried outputting
jupyter kernelspec list
And get only the base kernel which suggests from this that it's not finding my kernelspec, but I can't seem to figure from the documentation what i'm supposed to do.
Am I missing something?
Ok so I've solved this.
I think there was an install issue with jupyter.
I tried reproducing this in a completely new project and venv and could get the kernel showing.
In the project and venv where I still couldn't, I noticed a discrepancy in the output of my jupyter --paths
In the working venv I could see under data
/home/oliver/.local/share/jupyter
Which is where the kernels I installed are located.
However in the project that wasn't working there was instead:
/home/oliver/snap/jupyter/6/.local/share/jupyter
I'm guessing this snap path is from how I originally installed jupyter on my Ubuntu via the app store - seemed sensible at the time.
So I uninstalled jupyter, restarted my venv and the jupyter --paths has magically changed so that
/home/oliver/.local/share/jupyter
is present and when I start a jupyter notebook at the command line with
jupyter notebook
I can see all my kernels showing!
I found this quite difficult to debug with the documentation and command help outputs so hope someone else finds this useful.
I have created a free ubuntu instances on AWS ec2. I have installed jupyter notebook using command pip install jupyter. Please refer the screen shot showing
But while I'm trying to run jupyter notebook or jupyter notebook --generate-config, I'm getting error message as Command 'jupyter' not found. Can you please help me resolve this issue?
I use Jupyter too but I installed it completely different. You can install Anaconda3 which is used for python very often. From there, you can open the Anaconda3 prompt and use the simple command jupyter notebook to open it.
I have recently install Jupyter notebook in my MacBook Pro (runnig Mac OS X). But I have some trouble with this notebook now.
When I write some code inside the notebook for matplotlib plotting and run the code it just open my Python Launcher (instead showing the plot in the notebook.) and I have to Force quit this launcher. I cannot understand what is the problem with this new notebook which I install recently.
Then I try to use %matplotlib inline or %matplotlib notebook at the beginning of my code but it remains the same behavior. In fact, if I only run the single line code %matplotlib inline in a new file in jupyter it just launch my Python Launcher and immediately my system don't respond and I have to force quite the Python Launcher.
I cannot understand what's the problem with my notebook after the new installation. Please help me.
Here my system configurations
jupyter 1.0.0
ipython 7.0.1
matplotlib 3.0.0
Edit:
I have installed Python 3 from the website :https://www.python.org/ by downloading the file.
and installed Jupyter Notebook by: python3 -m pip install --user jupyter
Should I reinstall them to solve this?
I cannot use my all notebooks that I previously created. Does anyone here can help me ?
Edit 2
Just a few minute ago, I uninstall my python3 using sudo rm -rf /Applications/Python\ 3.7 . and my python3 has been gone from my applications. But still when I type python3 in my terminal it opens up Python3. I guessed this happens because before the recent installation from python website I install python using homebrew. Is it possible that this version of python is still running where as the older version is gone.
In this situation I don't know what to do...Should I uninstall everything related to python3 and install it again to repair the Jupyter notebook. Thank you..