%matplotlib
is not showing when pressing tab for autocompletation in IPython terminal.
What steps will reproduce the problem?
%mat
+TABWhat is the expected output? What do you see instead?
Typing %ma
+TAB shows %macro %magic %%markdown
but not %matplotlib
Please provide any additional information below
Running Spyder with IPython 6.0 does it work.
It also works with Jupyter QTConsole independently, so it seems related to Spyder and IPython 6.1 somehow.
pyflakes >=0.6.0 : 1.6.0 (OK)
pycodestyle >=2.3: 2.3.1 (OK)
pygments >=2.0 : 2.2.0 (OK)
pandas >=0.13.1 : 0.20.3 (OK)
numpy >=1.7 : 1.13.1 (OK)
sphinx >=0.6.6 : 1.6.3 (OK)
rope >=0.9.4 : 0.9.4-1 (OK)
jedi >=0.9.0 : 0.10.2 (OK)
nbconvert >=4.0 : 5.2.1 (OK)
sympy >=0.7.3 : None (NOK)
cython >=0.21 : None (NOK)
qtconsole >=4.2.0: 4.3.1 (OK)
IPython >=4.0 : 6.1.0 (OK)
pylint >=0.25 : 1.7.2 (OK)
@dalthviz, can you reproduce this on Windows?
@ccordoba12 running with IPython 5.3 and 6.1 works for me in Spyder 3.2.1, although I tested this in Python 3.6.1:
although I tested this in Python 3.6.1
Please match the exact same environment as @rubennj and try again.
It also worked with Python 3.6.2 and the dependencies listed:
Thanks @dalthviz!
@rubennj, I'm closing this issue because Spyder doesn't have any influence on code completion in the IPython console.
I guess this is an installation issue.
Is matplotlib
installed in your tests? I try a new enviroment without it and the autocompletation works, but when matplotlib
is installed then the issue appears.
@dalthviz?
Yep I installed matplotlib. This is the list of the packages in the env where I tested, maybe @rubennj could you find something that differs from the env where you are seeing the problem?
# packages in environment at C:\Users\Daniel\Anaconda3\envs\test-mat:
#
alabaster 0.7.10 py36_0
astroid 1.5.3 py36_0
babel 2.4.0 py36_0
bleach 1.5.0 py36_0
chardet 3.0.4 py36_0
colorama 0.3.9 py36_0
cycler 0.10.0 py36_0
decorator 4.1.2 py36_0
docutils 0.14 py36_0
entrypoints 0.2.3 py36_0
html5lib 0.9999999 py36_0
icu 57.1 vc14_0 [vc14]
imagesize 0.7.1 py36_0
ipykernel 4.6.1 py36_0
ipython 6.1.0 py36_0
ipython_genutils 0.2.0 py36_0
isort 4.2.15 py36_0
jedi 0.10.2 py36_2
jinja2 2.9.6 py36_0
jpeg 9b vc14_0 [vc14]
jsonschema 2.6.0 py36_0
jupyter_client 5.1.0 py36_0
jupyter_core 4.3.0 py36_0
lazy-object-proxy 1.3.1 py36_0
libpng 1.6.27 vc14_0 [vc14]
markupsafe 1.0 py36_0
matplotlib 2.0.2 np113py36_0
mistune 0.7.4 py36_0
mkl 2017.0.3 0
nbconvert 5.2.1 py36_0
nbformat 4.3.0 py36_0
notebook 5.0.0 py36_0
numpy 1.13.1 py36_0
numpydoc 0.7.0 py36_0
openssl 1.0.2l vc14_0 [vc14]
pandas 0.20.3 py36_0
pandocfilters 1.4.1 py36_0
path.py 10.3.1 py36_0
pickleshare 0.7.4 py36_0
pip 9.0.1 py36_1
prompt_toolkit 1.0.15 py36_0
psutil 5.2.2 py36_0
pycodestyle 2.3.1 py36_0
pyflakes 1.6.0 py36_0
pygments 2.2.0 py36_0
pylint 1.7.2 py36_0
pyparsing 2.2.0 py36_0
pyqt 5.6.0 py36_2
python 3.6.2 0
python-dateutil 2.6.1 py36_0
pytz 2017.2 py36_0
pyzmq 16.0.2 py36_0
qt 5.6.2 vc14_6 [vc14]
qtawesome 0.4.4 py36_0
qtconsole 4.3.1 py36_0
qtpy 1.3.0 py36_0
requests 2.14.2 py36_0
rope 0.9.4 py36_1
setuptools 27.2.0 py36_1
simplegeneric 0.8.1 py36_1
singledispatch 3.4.0.3 py36_0
sip 4.18 py36_0
six 1.10.0 py36_0
snowballstemmer 1.2.1 py36_0
sphinx 1.6.3 py36_0
sphinxcontrib 1.0 py36_0
sphinxcontrib-websupport 1.0.1 py36_0
spyder 3.2.1 py36_0
testpath 0.3.1 py36_0
tk 8.5.18 vc14_0 [vc14]
tornado 4.5.1 py36_0
traitlets 4.3.2 py36_0
vs2015_runtime 14.0.25420 0
wcwidth 0.1.7 py36_0
wheel 0.29.0 py36_0
wrapt 1.10.11 py36_0
zlib 1.2.11 vc14_0 [vc14]
OK, I think I got it, @dalthviz. I had enabled the option _"Automatically load Pylab and NumPy modules"_.
Populating the interactive namespace from numpy and matplotlib
When this option is on, I can't get the autocomplete for %matplotlib
.
Nevertheless, even if it is not shown, it can be executed and it works.
You're right, now I can reproduce this bug. A simpler way to do it is by
running
%pylab
in a console, which is what Spyder does for you when you activate that
option.
However, this is a bug in IPython, not in Spyder, so please report it there:
https://github.com/ipython/ipython
El 23/08/17 a las 02:33, Ruben Nuñez escribió:
>
OK, I think I got it, @dalthviz https://github.com/dalthviz. I had
enabled the option /"Automatically load Pylab and NumPy modules"/.Populating the interactive namespace from numpy and matplotlib
When this option is on, I can't get the autocomplete for |%matplotlib|.
Nevertheless, even if it is not shown, it can be executed and it works.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/spyder-ide/spyder/issues/5020#issuecomment-324246440,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWS7Rfv3z6aDuCkU8-nujMsVH58RBUYks5sa9XXgaJpZM4O9PeB.
I will open an issue in IPython then.
Thanks @ccordoba12 and @dalthviz for the effort to catch it.
That's a side effect of https://github.com/ipython/ipython/pull/10542, basically %pylab injects matplotlib
into the namespace and thus is not completed as a magic anymore. This was requested in https://github.com/ipython/ipython/issues/4877, We should probably be less extream and still complete to magics if the text starts with %
/%%
.