Hi there,
I’m trying to run a MAF tutorial in a jupyter notebook and I am getting this error when I try to start jupyter:
*******@sc:~/lsst_stack$ jupyter notebook
Traceback (most recent call last):
File "/home/nicholas/anaconda3/lib/python3.6/site-packages/notebook/nbextensions.py", line 18, in <module>
from urllib.request import urlretrieve
File "/home/nicholas/anaconda3/lib/python3.6/urllib/request.py", line 88, in <module>
import http.client
File "/home/nicholas/lsst_stack/Linux64/python_future/0.16.0/lib/python/future-0.16.0-py2.7.egg/http/__init__.py", line
7, in <module>
raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future
src folder or your installation of python-future is corrupted.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/nicholas/anaconda3/bin/jupyter-notebook", line 4, in <module>
import notebook.notebookapp
File "/home/nicholas/anaconda3/lib/python3.6/site-packages/notebook/__init__.py", line 25, in <module>
from .nbextensions import install_nbextension
File "/home/nicholas/anaconda3/lib/python3.6/site-packages/notebook/nbextensions.py", line 20, in <module>
from urlparse import urlparse
ModuleNotFoundError: No module named 'urlparse'
Here are the steps I took to install the LSST stack and MAF:
mkdir -p $HOME/lsst_stack
cd $HOME/lsst_stack
unset LSST_HOME EUPS_PATH LSST_DEVEL EUPS_PKGROOT REPOSITORY_PATH
curl -OL https://raw.githubusercontent.com/lsst/lsst/13.0/scripts/newinstall.sh
bash newinstall.sh
[yes to miniconda installation]
source loadLSST.bash
eups distrib install lsst_sims -t sims
setup sims_maf -t sims
eups list -v sims_maf
Where the output from that last command is:
2.3.6.sims /home/nicholas/lsst_stack /home/nicholas/lsst_stack/Linux64/sims_maf/2.3.6.sims sims current sims_2_3_6 setup
So I feel that I have installed the LSST stack properly, but I don’t know how to get jupyter notebook running without the above error.
I can run jupyter notebook fine from a new terminal ,i.e. before I run
source loadLSST.bash
setup sims_maf -t sims
But if I try to run the python notebook tutorial, it breaks here:
# Import required dependencies from LSST stack
import lsst.sims.maf.db as db
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-5804c9d8b44d> in <module>()
5
6 # Import required dependencies from LSST stack
----> 7 import lsst.sims.maf.db as db
8 import lsst.sims.maf.metrics as metrics
9 import lsst.sims.maf.slicers as slicers
ModuleNotFoundError: No module named 'lsst'
I think there is some conflict arising from the installation of python3 which was on the system before I started the installation of the LSST stack. Is there a solution?