I'm using SunPy in an environment, and have updated in the command line using conda update sunpy. According to the command line, I am using the current version (4.13.0). However, when I open jupyter and load a notebook, I get the following:
import sunpy as sp
print(sp.__version__)
3.1.7
I've checked to make sure that sunpy was updated in the right folder, I used the right command, I was within the environment when I updated, etc. I'm still getting the wrong version, even if I try %conda install -c conda-forge sunpy to update within the jupyter notebook itself (it says it's already up-to-date). Any ideas on how to force it to load the correct version? Thanks in advance!
This worked for me. Not for sunpy but pandas. I executed line by line within nb cell.
!pip install pandas==1.3.5
%conda install -c conda-forge pandas
import pandas as pd
Then pd. __version__
i get: '1.3.5'
I am trying to create new environments and to install the necessary package. However, when I try to install Matplot lib, I am getting the following error InvalidArchiveError('Error with archive C:\\Users\\X\\Anaconda3\\pkgs\\openssl-1.1.1h-he774522_0.tar.bz2. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nCould not unlink'). I tried to use conda clear -a to remove all files and then try to install matplotlib using conda install -c conda-forge matplotlib but getting the same error.
Any idea how to solve this issue? Thanks in advance.
I keep getting the error: ModuleNotFoundError: No module named 'seaborn'
when trying to import seaborn.
I have installed seaborn using both pip install seaborn and conda install seaborn.
I saw on seaborn that I am not the only one who has had this issue, but I have not been able to resolve this problem, how can I check and updated that my pip/conda points to the same installation as my interpreter?
EDIT:
I have tried running !pip install seaborn in the notebook, but this still does not work. I have also created my own conda env and installed seaborn (it shows base in the photos) but this also did not work.
you might have an old version of Jupyter notebook, so need to try this command to install it in the current kernel.
import sys
!{sys.executable} -m pip install seaborn
In the New Jupyter version (2019) can be installed simply as:
%pip install seaborn
Note: Answer from different question!
When i try to use from IPython.display import clear_output, display_html, then i show the error:
(ImportError: No module named IPython)
I am using Python 2.7.13, and im trying to make the game of life from John Conway. I am following this link: http://nbviewer.jupyter.org/url/norvig.com/ipython/Life.ipynb
I have read another questions and answers about it, but any answer works for me. First, this error is showed in command line, and when i try to run this code in a file. Second, this error is direct to IPython, not submodule or something similiar.
Ok, finally i achieved my goal.
I wrote ipython --version but i found, it was not installed.
I tried to install it, with pip. I went to C:\Python27\Scripts, here is pip, you can try in this directory, or add to environment variables.
I tried to install ipython, but i found a error
error: Unable to find vcvarsall.bat
so i installed visual studio c++ 9.0, the version to python 2.7.
pip install ipython
If you scrolled this far you may want to try:
import IPython
as opposed to import Ipython. Notice that 2 letters are capitalized
For Anaconda try,
conda install -c anaconda ipython
Use this code to install the IPython library:
!pip install ipython
import IPython
Well, this works on Google Colab.
This is most likely because ipython is not installed.
You can install it with pip.
pip install ipython
If you are using Anaconda (the full version) ipython comes preinstalled. If you are using Miniconda or if the ipython is deleted for some reason you can re-install with
conda install -c anaconda ipython
If you are using it with jupyter. You might want to register the ipython with a user.
python -m ipykernel install [--user] [--name <machine-readable-name>] [--display-name <"User Friendly Name">]
Reference :
Official Documentation
I have a similar issue, but it appears when I was running the script under sudo. Fast and easiest way was to install IPython under sudo.
sudo pip3 install IPython
I am running a script that uses IPython module, in my terminal. If you are also trying to do something similar, this answer might help you.
!pip3 install IPython
Things to keep in mind:-
'I' and 'P' in IPython are uppercase.
I am running the above command in python 3.7.
you need to import
from IPython.display import Image
initially, I imported
from IPython.display import image
so there is Image not image
For me, the problem (that drove me crazy) is that I actually needed capitalization. The correct import after pip install is:
from IPython.display import display, update_display
etc.
I have recently installed Anaconda with Python 3.5 and all the rest. I come from R where I am used to install packages dynamically. I am trying to install a module called scitools through jupyter notebook. I would like to recreate this in jupyter. However, I don't know how to dynamically install packages (if it's possible). I would greatly appreciate your help. Thank you!
EDIT: I am trying to use conda as recommended by the community, but it's not working. I am using mac OSX
Check Jake Vander Plus Blog here to learn how to install a package with pip from Jupyter Notebook.
# Install a pip package in the current Jupyter kernel
import sys
!{sys.executable} -m pip install numpy
So if you have already done the install with anaconda, you may already have the module installed. In that case in your jupyter notebook after you have activated your kernel, you just need to make sure you execute the import statement.
import scitools
If you haven't installed that module yet, you can install it one of two ways. Both work from your command line or terminal.
pip install scitools
or since you have Anaconda
conda install scitools
and that should do it. Your import statement in your notebook when executed should correctly locate and enable the use of that module.
I had the same issue. It turns out if you open an anaconda window, which in Windows is accessible under the Anaconda drop down, it points to the correct location to install (or update) using pip.