Mona Jalal
Mona Jalal

Reputation: 38245

ShimWarning: The `IPython.config` package has been deprecated since IPython 4.0. You should import from traitlets.config instead

How should I fix this for Anaconda Python 3.6?

%load_ext sql
%sql sqlite://

%load_ext autoreload
%autoreload 2

# To help render markdown
from IPython.core.display import display, HTML
from markdown import markdown
def render_markdown_raw(m): return display(HTML(markdown(m))) # must be last element of cell.
def render_markdown(m): return render_markdown_raw(m.toMD())

# import the relational algbera operators
from relation_algebra import Select, Project, Union, NJoin, CrossProduct, BaseRelation
from relation_algebra import get_result, compare_results

from display_tools import side_by_side

import random

I get the following error after CTRL+Entering the above code:

/Users/mona/anaconda/lib/python3.6/site-packages/IPython/config.py:13: ShimWarning: The `IPython.config` package has been deprecated since IPython 4.0. You should import from traitlets.config instead.
  "You should import from traitlets.config instead.", ShimWarning)
/Users/mona/anaconda/lib/python3.6/site-packages/IPython/utils/traitlets.py:5: UserWarning: IPython.utils.traitlets has moved to a top-level traitlets package.
  warn("IPython.utils.traitlets has moved to a top-level traitlets package.")
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-51657b05e47c> in <module>()
     12 
     13 # import the relational algbera operators
---> 14 from relation_algebra import Select, Project, Union, NJoin, CrossProduct, BaseRelation
     15 from relation_algebra import get_result, compare_results
     16 

ModuleNotFoundError: No module named 'relation_algebra'

Also, I can't find the relation_algebra package:

nat-wireless-eduroam-guest-153-28:CS460_660 mona$ conda install relation_algebra
Fetching package metadata .........

PackageNotFoundError: Packages missing in current channels:

  - relation_algebra

We have searched for the packages in the following channels:

  - https://repo.continuum.io/pkgs/free/osx-64
  - https://repo.continuum.io/pkgs/free/noarch
  - https://repo.continuum.io/pkgs/r/osx-64
  - https://repo.continuum.io/pkgs/r/noarch
  - https://repo.continuum.io/pkgs/pro/osx-64
  - https://repo.continuum.io/pkgs/pro/noarch

nat-wireless-eduroam-guest-153-28:CS460_660 mona$ conda install -c conda-forge relation_algebra
Fetching package metadata ...........

PackageNotFoundError: Packages missing in current channels:

  - relation_algebra

We have searched for the packages in the following channels:

  - https://conda.anaconda.org/conda-forge/osx-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.continuum.io/pkgs/free/osx-64
  - https://repo.continuum.io/pkgs/free/noarch
  - https://repo.continuum.io/pkgs/r/osx-64
  - https://repo.continuum.io/pkgs/r/noarch
  - https://repo.continuum.io/pkgs/pro/osx-64
  - https://repo.continuum.io/pkgs/pro/noarch

Extra information:

nat-wireless-eduroam-guest-153-28:CS460_660 mona$ which python
/Users/mona/anaconda/bin/python
nat-wireless-eduroam-guest-153-28:CS460_660 mona$ python
Python 3.6.2 |Anaconda custom (x86_64)| (default, Jul 20 2017, 13:14:59) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
nat-wireless-eduroam-guest-153-28:CS460_660 mona$ conda -V
conda 4.3.25
nat-wireless-eduroam-guest-153-28:CS460_660 mona$ conda list | grep jupyter
jupyter                   1.0.0                    py36_3  
jupyter_client            5.0.1                    py36_0  
jupyter_console           5.1.0                    py36_0  
jupyter_core              4.3.0                    py36_0  
nat-wireless-eduroam-guest-153-28:CS460_660 mona$ conda list | grep ipython
ipython                   5.3.0                    py36_0  
ipython-sql               0.3.6                    py36_1    conda-forge
ipython_genutils          0.2.0                    py36_0  

Upvotes: 0

Views: 2080

Answers (1)

Mona Jalal
Mona Jalal

Reputation: 38245

It is because relation_algebra.py should be downloaded from relation_algebra.py

http://web.stanford.edu/class/cs145/cs145-notebooks-2016/lecture-16/relation_algebra.py

Upvotes: 1

Related Questions