2 Replies Latest reply on Jun 14, 2018 2:47 AM by Intel Corporation

    How can I activate a jupyter nb using a specific conda environment?

    virtualdvid

      Hi,

       

      I'm writing a notebook to visualize friendly tables and charts but I'm having problems because the notebook is not recognizing some libraries. I tried to install them using `pip install --user...` but I'm getting this error:

       

      pip install --user pandas

      Traceback (most recent call last):

        File "/glob/intel-python/python3/bin/pip", line 4, in <module>

          import pip

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages/pip/__init__.py", line 26, in <module>

          from pip.utils import get_installed_distributions, get_prog

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages/pip/utils/__init__.py", line 27, in <module>

          from pip._vendor import pkg_resources

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3018, in <module>

          @_call_aside

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3004, in _call_aside

          f(*args, **kwargs)

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3046, in _initialize_master_working_set

          dist.activate(replace=False)

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2578, in activate

          declare_namespace(pkg)

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2152, in declare_namespace

          _handle_ns(packageName, path_item)

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2092, in _handle_ns

          _rebuild_mod_path(path, packageName, module)

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2121, in _rebuild_mod_path

          orig_path.sort(key=position_in_sys_path)

      AttributeError: '_NamespacePath' object has no attribute 'sort'

       

      How can I activate a conda environment in a jupyter notebook?

       

      Thanks!!