Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spyder notebook not visible under panes tab #435

Open
touradnik9 opened this issue Jul 15, 2023 · 11 comments
Open

Spyder notebook not visible under panes tab #435

touradnik9 opened this issue Jul 15, 2023 · 11 comments

Comments

@touradnik9
Copy link

Description of your problem

What steps will reproduce the problem?

installed Spyder, then the plugin. The notebook plugin is not visible under panes

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

To be able to use the plugin notebook

Please provide any additional information below (stack trace, screenshots, a gif, etc)

Versions and main components

  • Spyder Version: 5.4.3
  • Python Version: 3.11.4

Dependencies

Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:

@touradnik9
Copy link
Author

Dependencies

Mandatory:

atomicwrites >=1.2.0 : 1.4.1 (OK)
chardet >=2.0.0 : 5.1.0 (OK)
cloudpickle >=0.5.0 : 2.2.1 (OK)
cookiecutter >=1.6.0 : 2.2.3 (OK)
diff_match_patch >=20181111 : 20230430 (OK)
intervaltree >=3.0.2 : 3.1.0 (OK)
IPython >=7.31.1,<9.0.0,!=8.8.0,!=8.9.0,!=8.10.0 : 8.14.0 (OK)
jedi >=0.17.2,<0.19.0 : 0.18.2 (OK)
jellyfish >=0.7 : 1.0.0 (OK)
jsonschema >=3.2.0 : 4.18.3 (OK)
keyring >=17.0.0 : 24.2.0 (OK)
nbconvert >=4.0 : 7.6.0 (OK)
numpydoc >=0.6.0 : 1.5.0 (OK)
paramiko >=2.4.0 : 3.2.0 (OK)
parso >=0.7.0,<0.9.0 : 0.8.3 (OK)
pexpect >=4.4.0 : 4.8.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
psutil >=5.3 : 5.9.5 (OK)
pygments >=2.0 : 2.15.1 (OK)
pylint >=2.5.0,<3.0 : 2.17.4 (OK)
pylint_venv >=2.1.1 : 3.0.2 (OK)
pyls_spyder >=0.4.0 : 0.4.0 (OK)
pylsp >=1.7.2,<1.8.0 : 1.7.4 (OK)
pylsp_black >=1.2.0 : 1.3.0 (OK)
qdarkstyle >=3.0.2,<3.2.0 : 3.1 (OK)
qstylizer >=0.2.2 : 0.2.2 (OK)
qtawesome >=1.2.1 : 1.2.3 (OK)
qtconsole >=5.4.2,<5.5.0 : 5.4.3 (OK)
qtpy >=2.1.0 : 2.3.1 (OK)
rtree >=0.9.7 : 1.0.1 (OK)
setuptools >=49.6.0 : 68.0.0 (OK)
sphinx >=0.6.6 : 7.0.1 (OK)
spyder_kernels >=2.4.3,<2.5.0 : 2.4.4 (OK)
textdistance >=4.2.0 : 4.5.0 (OK)
three_merge >=0.1.1 : 0.1.1 (OK)
watchdog >=0.10.3 : 3.0.0 (OK)
zmq >=22.1.0 : 25.1.0 (OK)

Optional:

cython >=0.21 : 0.29.36 (OK)
matplotlib >=3.0.0 : 3.7.2 (OK)
numpy >=1.7 : 1.25.1 (OK)
pandas >=1.1.1 : 2.0.3 (OK)
scipy >=0.17.0 : 1.11.1 (OK)
sympy >=0.7.3 : 1.12 (OK)

@jimclay75051
Copy link

I have a similar problem. I installed it. It was there and work. But just now I opened Sypder, and the Notebook no longer shows up.

@jimclay75051
Copy link

I tried to reinstall the plugin, but I get the message "All requested packages already installed." But after quitting and starting Spyder several times, the notebook is still not showing up in the panes menus.

@jitseniesen
Copy link
Member

@touradnik9 @jimclay75051 It looks like something went wrong when installing the Spyder notebook plugin, but I don't know what. Maybe it helps if I get some more information. Can you please try the following?

Firstly, go to Tools > Preferences > Python interpreter and select the first option: "Default (i.e. the same as Spyder's)". Then open a new console with Consoles > New console (default settings) and give the command import spyder_notebook in the new console. Check that this does not give an error. It is fine if there is a message starting with "No QCoreApplication instance found", as in the picture. If you changed the Python interpreter in the Preferences, then you will probably want to change it back to what you had before.

console-notebook

Secondly, in Spyder, click on the menu item File > Restart in debug mode and then select Verbose. After Spyder has restarted, click on the menu item Tools > Debug log > spyder-debug.log. This will open the debug log file in the editor. In the file, search for "spyder_notebook". This should find a line with "Registering plugin notebook". Are there any error messages around that line? Please copy that line and the first few lines after it. This is what it looks like for me (you may have to scroll the text to the right to see everything):

2023-07-19 13:11:01,968 [DEBUG] [spyder.api.plugin_registration.registry] -> Registering plugin notebook - <class 'spyder_notebook.notebookplugin.NotebookPlugin'>
2023-07-19 13:11:01,968 [DEBUG] [spyder.api.plugin_registration.mixins] -> Method on_ipyconsole_available is watching plugin ipython_console
2023-07-19 13:11:01,968 [DEBUG] [spyder.api.plugin_registration.mixins] -> Method on_ipyconsole_teardown will handle plugin teardown for ipython_console
2023-07-19 13:11:01,968 [DEBUG] [spyder.api.plugin_registration.mixins] -> Method on_preferences_available is watching plugin preferences
2023-07-19 13:11:01,969 [DEBUG] [spyder.api.plugin_registration.mixins] -> Method on_preferences_teardown will handle plugin teardown for preferences

@jimclay75051
Copy link

jimclay75051 commented Jul 19, 2023 via email

@jitseniesen
Copy link
Member

@jimclay75051 Unfortunately, I can't see your pictures. GitHub does not handle images in emails. Any change that you can put the pictures in a message on the GitHub website?

@jimclay75051
Copy link

Sorry about that. Here's those pictures.

2023-07-19_09-56-36
2023-07-19_10-02-39
2023-07-19_10-06-36
thumbnail_image

@jitseniesen
Copy link
Member

@jimclay75051 Like you say, you have the notebook plugin installed but Spyder does not seem to see it. Perhaps you installed the notebook plugin in one environment and Spyder in another.

This happens if you used Spyder's standalone installer, as described in the section Standalone Installers in our installation guide. These standalone installers unfortunately do not work with plugins (yet). I should have said this earlier ... We recommend using one of the conda-based distributions if you want to run Spyder with plugins.

If that does not help, then please do the following:

  1. Open an Anaconda prompt and give the command: conda info --envs. Show the results.
  2. Open Spyder. Open an internal console with View > Panes > Internal Console. In the internal console, give the command import sys; print(sys.executable). Show the result.

The first command gives a list of conda environments and their paths. In your picture, you have the "base" environment activated and the path will be something like C:\Users\jimcl\Anaconda3.

The second command should give the location of the Python interpreter that runs Spyder and hopefully we can use it to find the environment that Spyder is installed in. I don't have a Windows computer at the moment to test, but I think this should print something like C:\Users\jimcl\Anaconda3\bin\python.exe . Everything before "bin" is the path to the environment that Spyder is installed in. If you get a result like C:\Users\jimcl\Anaconda3\envs\blablabla\bin\python.exe then that indicates that Spyder is installed in an environment with name "blablabla", and you need to install the notebook plugin in the same environment.

@touradnik9
Copy link
Author

touradnik9 commented Jul 23, 2023

I found out that when I type Spyder into the search bar, there are 2 options:
Spyder
Spyder (spyder-env)

When the app that is only "Spyder" is loaded, then the notebook option appears under panes. If it is the spyder-env option, then the notebook option does not appear under panes. Any idea how I can have the notebook option appear under the spyder-env option?

Thanks!
Tim

@touradnik9
Copy link
Author

Also, in the notebook, does it have the same assist capability in the editor, like when you use a module and a list of options appear?

Thanks!

@jitseniesen
Copy link
Member

@touradnik9 I think that the "Spyder (spyder-env)" option refers to the version of Spyder that is installed in an environment called "spyder-env". The instructions in the section Conda-based distributions in the Spyder installation guide will in fact get you in that situation.

You need to install the spyder-notebook plugin in the spyder-env environment in order to make the notebook pane available in the version of Spyder that you get when you use the "Spyder (spyder-env)" option. You can do this as follows:

  1. Open an Anaconda prompt.
  2. Type conda activate spyder-env. This switches from your default environment (usually called "base") to the "spyder-env" environment.
  3. Type conda install spyder-notebook -c conda-forge. This will install the spyder-notebook plugin in the spyder-env environment.

As an aside, an environment in this setting refers to an independent collection of Python and other packages. The idea is that by using separate environments, installing or upgrading a package in one environment will not interfere with Spyder in a different environment. Search for "conda environment" for more information.

The notebook should have the same assist capability as in the editor. However, the system behind this is quite complicated, it does not always work and I don't really understand it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants