spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.37k stars 1.62k forks source link

Code to load third-party plugins gets confused when they are installed with "python setup.py develop" #4897

Open jcalbert opened 7 years ago

jcalbert commented 7 years ago

Description

What steps will reproduce the problem?

Occurred after updating Spyder, pyqt, qtpy via Conda.

What is the expected output? What do you see instead?

Please provide any additional information below

File "\~/anaconda2/lib/python2.7/site-packages/spyder/otherplugins.py", line 79, in _import_plugin module = _import_module_from_path(module_name, plugin_path) File "\~/anaconda2/lib/python2.7/site-packages/spyder/otherplugins.py", line 101, in _import_module_from_path info = imp.find_module(module_name, [plugin_path]) ImportError: No module named spyder_memory_profiler-0.1.0.dist-info ERROR: 3rd party plugin import failed for spyder_line_profiler-0.1.1-py2.7.egg-info Traceback (most recent call last): File "\~/anaconda2/lib/python2.7/site-packages/spyder/otherplugins.py", line 79, in _import_plugin module = _import_module_from_path(module_name, plugin_path) File "\~/anaconda2/lib/python2.7/site-packages/spyder/otherplugins.py", line 101, in _import_module_from_path info = imp.find_module(module_name, [plugin_path]) ImportError: No module named spyder_line_profiler-0.1.1-py2.7.egg-info

Version and main components

Dependencies

pyflakes >=0.5.0  :  1.2.3 (OK)
pycodestyle >=2.3 :  2.3.1 (OK)
pygments >=2.0    :  2.1.3 (OK)
pandas >=0.13.1   :  0.19.2 (OK)
numpy >=1.7       :  1.12.1 (OK)
sphinx >=0.6.6    :  1.4.1 (OK)
rope >=0.9.4      :  0.9.4 (OK)
jedi >=0.9.0      :  0.9.0 (OK)
psutil >=0.3      :  4.3.0 (OK)
nbconvert >=4.0   :  4.2.0 (OK)
sympy >=0.7.3     :  1.0 (OK)
cython >=0.21     :  0.25.2 (OK)
qtconsole >=4.2.0 :  4.2.1 (OK)
IPython >=4.0;<6.0:  5.3.0 (OK)
pylint >=0.25     :  1.5.4 (OK)
ccordoba12 commented 7 years ago

How did you install those plugins?

jcalbert commented 7 years ago

The general context is an old and ugly anaconda environment. At some point in antiquity:

conda install line_profiler
conda install memory_profiler

More recently: conda install spyder led to repeated crash-on-launch.

Then

conda upgrade qtpy
conda upgrade pyqt

got Spyder booting again, and it raised window asking to submit the above bug report. I haven't tried using those two plugins since updating spyder to 3.2.

ccordoba12 commented 7 years ago

Please remove this file

spyder_line_profiler-0.1.1-py2.7.egg-info

That should fix this error.