1
$\begingroup$

I am using ubuntu 16.04. after anacoda installation sypder not open. Anaconda version: 4.4.6

Anaconda environment

my_root                  /home/shiva/.conda/envs/my_root
py27                     /home/shiva/.conda/envs/py27
py35                     /home/shiva/.conda/envs/py35
base                  *  /home/shiva/anaconda
myenv                    /home/shiva/anaconda/envs/myenv

I get the following error

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/spyderlib/spyder.py", line 2331, in main
    mainwindow = run_spyder(app, options, args)
  File "/usr/lib/python3/dist-packages/spyderlib/spyder.py", line 2215, in run_spyder
    main.setup()
  File "/usr/lib/python3/dist-packages/spyderlib/spyder.py", line 752, in setup
    from spyderlib.plugins.inspector import ObjectInspector
  File "/usr/lib/python3/dist-packages/spyderlib/plugins/inspector.py", line 41, in <module>
    from spyderlib.widgets.ipython import IPythonControlWidget
  File "/usr/lib/python3/dist-packages/spyderlib/widgets/ipython.py", line 28, in <module>
    pygments_patch.apply()
  File "/usr/lib/python3/dist-packages/spyderlib/pygments_patch.py", line 22, in apply
    from pygments.lexer import _TokenType, Text, Error
  File "/usr/lib/python3/dist-packages/pygments/lexer.py", line 19, in <module>
    from pygments.filters import get_filter_by_name
  File "/usr/lib/python3/dist-packages/pygments/filters/__init__.py", line 20, in <module>
    from pygments.plugin import find_plugin_filters
  File "/usr/lib/python3/dist-packages/pygments/plugin.py", line 39, in <module>
    import pkg_resources
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
    @_call_aside
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2952, in _initialize_master_working_set
    add_activation_listener(lambda dist: dist.activate())
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 956, in subscribe
    callback(dist)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2952, in <lambda>
    add_activation_listener(lambda dist: dist.activate())
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2515, in activate
    declare_namespace(pkg)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2097, in declare_namespace
    _handle_ns(packageName, path_item)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2047, in _handle_ns
    _rebuild_mod_path(path, packageName, module)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2066, in _rebuild_mod_path
    orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'

how can I solve this problem?

$\endgroup$

closed as off-topic by Kiritee Gak, timleathart, Icyblade, oW_, Dawny33 Jan 5 '18 at 5:43

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about data science, within the scope defined in the help center." – Kiritee Gak, timleathart, Icyblade, oW_, Dawny33
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ open a new terminal and just type spyder. tell me what happens. $\endgroup$ – Media Jan 5 '18 at 13:49
1
$\begingroup$

According to this bug report, you can solve this with:

pip install --upgrade pip setuptools
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.