I'm using Macbook Pro(apple m1), and I've installed scipy and seaborn on my laptop with no problem. Now I'm trying to install scipy and seaborn on Jupyter Notebook(NumPy, pandas, and matplotlib installed on jupyter with no problems), but I'm getting error messages as the screenshot below. It seems like a problem about openblas, BLAS & LAPACK on my Jupiter notebook environment. Please help. Thanks!
enter image description here
enter image description here
enter image description here
I eventually found this answer from another post, it worked.
pip install --pre -i https://pypi.anaconda.org/scipy-wheels-nightly/simple scipy
Related
I am using python 3.6 on my ubuntu 64 bit machine.I have also installed anaconda 4.4.0.How to install basemap in anaconda via jupyter notebook?
You can directly install it using Anaconda Navigator.Please follow the below steps:
Open "Anaconda Navigator"
Go to "Environments"
On the Environments Page, select Not Installed from the drop down menu.
Search basemap (or any package you want to install)
Select and click Apply
I hope it will help.
Thanks.
#Ken is right, you don't install on Jupyter. You might like to follow the install guide at https://github.com/matplotlib/basemap#install.
This requires downloading numpy and matplotlib beforehand, which can be easily done by running pip install numpy matplotlib on the command line interface.
Once done, you can put the code up on Jupyter. The example below is taken from http://basemaptutorial.readthedocs.io/en/latest/plotting_data.html.
map = Basemap(projection='ortho', lat_0=0, lon_0=0)
map.drawmapboundary(fill_color='aqua')
map.fillcontinents(color='coral', lake_color='aqua')
map.drawcoastlines()
x, y = map(0, 0)
map.plot(x, y, marker='D',color='m')
plt.show()
I just installed it and this works well for me.
The following 3 steps solved my problem:
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install basemap
I am using PyCharm and I ran into some errors while installing scipy and sklearn but not numpy, matplotlib and pandas. I tried browsing "Christopher Gohkle's "Python Extension Packages For Windows" as this problem seems to happen before but the site is now refusing connection. Any other way to solve this problem? Thanks!
Error message
Christopher Gohkle's site is up now. You can just check it out again.
But I suggest you to install Anaconda instead. It includes scipy and installation is so easy.
So I am trying to use Ipython notebook with Anaconda (Windows10). I got into anaconda cmd and create a new environment TryThis. I install Seaborn in this environment. And then I run Ipython command in the conda cmd.
conda create --name TryThis python=2
activate TryThis
conda install seaborn
ipython
When I run
import seaborn as sns
in this it executes allright.
However if I exit this and then run
ipython notebook
in the conda cmd and go on to do the import in an ipython notebook in browser, it throws error
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-ed9806ce3570> in <module>()
----> 1 import seaborn as sns
ImportError: No module named seaborn
I do not understand what is going wrong. If Seaborn is in this anaconda environment and I initiated Ipython notebook in this environment and Ipython in console can recognize it, why doesn't the notebook ?
What I might be doing is something blatantly incorrect, but I just started out with using anaconda !
Type:
!conda info
in your notebook. Check what default environment says. It should be the same as in your session in which you can import seaborn.
First try
conda install seaborn
Restart your Jupyther notebook and see if it works.
If you have already installed Seaborn using conda, make sure that when you start Jupyter notebook, it uses the Anaconda path.
It typically prints out the path in terminal when you start Jupyter notebook.
I have run into this issue earlier, and the reason was that my Jupyter notebook was using the path from .graphlab (a tool by Dato/Turi/Apple). So even though I had installed Seaborn correctly with conda insatall seaborn , the Jupyter notebook was not able to find the library.
You may not have the exact same issue, but from what you're describing, it sounds like your issue is somewhat similar.
If you're able to import seaborn, when you run ipython from terminal; and if you're not able to import seaborn from Jupyter notebook, then follow these steps:
From your terminal, find the ipython path with
which ipython
Now, Start Jupyter notebook and pay attention (in your terminal) to which path your Jupyter notebook is using.
If you're not able to import seaborn in Jupyter notebook, most likely that path is different from the ipython path that you saw earlier.
Once you have confirmed that this is the issue, then all you need to do is make Jupyter use correct path. There are various ways to do it. My way was to get rid of my installation of Anaconda entirely, and install jupyer notebook using pip.
pip install jupyter
As long as you have installed your libraries (NumPy, SciPy, Pandas, Seaborn, etc) using pip, your jupyter will be able to import these libraries. In my opinion, pip install * is the way to go for anything Python.
I finally was able to install ipython on my Windows 7 PC and it runs without any errors. The problem is that I used to code in ipython but in MAC. Now that I am trying to upload my previous notebooks I receive the following error:
Unreadable Notebook: MyFile.ipynb Unsupported nbformat version 4
I found this answer for my question but unfortunately that is not for windows and did not resolve my problem. It is worth to mention:
ipython --version
produces:
2.3.1
Any help or comment on this is much appreciated.
Thanks
It took me a while to figure this out but I got the first lead from user "cel". I used to have multiple versions of python (2.7 and 3.4). I removed python 3.4 because it's not compatible with spark yet. Next, I had to remove WinPython3.4 and replace it with WinPython2.7 so it can integrate with python 2.7 installed on my PC. Finally, I installed python 2.7.9 and set the C:/Python27/Script as a part of system environment variable. After doing all this I ran the following commands:
pip uninstall ipython
This helped me to remove older version of ipython. Then:
pip install ipython
This installed the latest version of ipython on my windows pc. Finally:
pip install notebook --upgrade
To upgrade notebook to latest version. Right now, ipython os installed and and should work fine doing this:
ipython notebook
Had no problem importing my previous .ipynb after all of the above.
Good luck to you all.
I have the same problem on Linux. Simply doing:
sudo pip install notebook --upgrade
worked for me. I have python 3.4 and 2.7 and unlike the answer by nimafl, there was no need for me to remove one them or to first uninstall ipython. A simple upgrade did the trick. Now instead of version 2.3.1 I have version 4.0.3 of ipython.
i am trying to get inline graphs working in iPython notebook.. i begin by starting ipython with the command ipython notebook --pylab inline.
when i try to use the plot() function i get the following error
im running on OSX 10.6.8 and running ipython out of a virtualenv i have matplotlib and libpng installed
i also get this warning in the terminal
libpng warning: Application built with libpng-1.2.41 but running with 1.5.13
and plot() works normally when i use ipython in the terminal only when i use ipython notebook i get this error.. can someone help me with this..?
I had this problem as well. Another solution is to change the format which the notebook will render images in, from 'png' to 'svg'. This can be done in your config file. Mine is located at:
~/.ipython/profile_default/ipython_notebook_config.py
There is a line that looks like this
# c.InlineBackend.figure_format = 'png'
Uncommenting and changing to 'svg' did the trick for me:
c.InlineBackend.figure_format = 'svg'
This recent question on this board is similar to yours: matplotlib and libpng issues with ipython notebook
See if the solution there solves your issue.
so i finally got this working..
first off i had to get all my outdated ports updated
first i did port selfupdate
then sudo port update outdated
after that i reinstalled ipython using mac ports
sudo port install py27-ipython
then i had to install tornado and pyzmq respectively as ipython depends on it
sudo port install py27-tornado
sudo port install py27-zmq
and then ran it from the terminal
ipython notebook --pylab inline
everything works fine now i can plot maps inline in ipython!
i guess the reason it didnt work before was some problems with pip maybe its installing matplotlib that is build only for libpng 1.2.41 ??... so anyways if anyone else faces this problem id suggest reinstalling all the libraries and ipython via mac ports thats the only thing that worked for me.
Since it was complaining that the versions of libpng used for building and for running are different, I have reinstalled the matplotlib by forcing the path to includes.
CFLAGS="`libpng-config --cflags`" pip install matplotlib -I