- Saved searches
- Use saved searches to filter your results more quickly
- Auto select the only IPython or Python console after startup #3109
- Auto select the only IPython or Python console after startup #3109
- Comments
- IPython Console¶
- Supported features¶
- Special consoles¶
- Options menu¶
- Using external kernels¶
- Connect to a local kernel¶
- Connect to a remote kernel¶
- Reload changed modules¶
- Saved searches
- Use saved searches to filter your results more quickly
- Spyder 3.1.4 : No Python console is currently selected to run #5318
- Spyder 3.1.4 : No Python console is currently selected to run #5318
- Comments
- Description
- Version and main components
- Dependencies
- Saved searches
- Use saved searches to filter your results more quickly
- No console (python/ipython) in spyder from software-center (ubuntu 14.04) #3028
- No console (python/ipython) in spyder from software-center (ubuntu 14.04) #3028
- Comments
- Problem: No (active) console (python/ipython) in Spyder
- Update: Installation from Terminal
- Versions and main components
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
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
Auto select the only IPython or Python console after startup #3109
Auto select the only IPython or Python console after startup #3109
Comments
When I first start Spyder and try to run a file, a dialog pops up with the complaint:
No Python console is currently selected to run XXX.py.
Please select or open a new Python console and try again.
Since I have only one IPython console open and no Python console, I think it will be great if Spyder can automatically select that only IPython console for me and run the file.
I guess many users would have only one IPython or Python console open after starting Spyder,
so it can be a very convenient feature for Spyder to auto select the only IPython or Python console after startup.
The text was updated successfully, but these errors were encountered:
IPython Console¶
The IPython Console allows you to execute commands and interact with data inside IPython interpreters.
To launch a new IPython instance, go to New console (default settings) under the Consoles menu, or use the keyboard shortcut Ctrl — T ( Cmd — T on macOS) when the console is focused.
From the same menu, you can stop currently executing code with Interrupt kernel , clear a console’s namespace with Remove all variables , or relaunch a fresh one with Restart kernel . As each console is executed in a separate process, this won’t affect any others you’ve opened, and you will be able to easily test your code in a clean environment without disrupting your primary session.
Supported features¶
Any IPython Console , whether external or started by Spyder, supports:
- Automatic code completion
- Real-time function calltips
- Full GUI integration with the enhanced Spyder Debugger .
- The Variable Explorer , with GUI-based editors for many built-in and third-party Python objects.
- Display of Matplotlib graphics in Spyder’s Plots pane, if the Inline backend is selected under Preferences ‣ IPython console ‣ Graphics ‣ Graphics backend , and inline in the console if Mute inline plotting is unchecked under the Plots pane’s options menu.
For information on the features, commands and capabilities built into IPython itself, see the IPython documentation.
Special consoles¶
Spyder also supports several types of specialized consoles. A Sympy console enables creating and displaying symbolic math expressions right inside Spyder. A Cython console allows you to use the Cython language to speed up your code and call C functions directly from Python. Finally, a Pylab console loads common Numpy and Matplotlib functions by default; while this is deprecated and strongly discouraged for new code, it can still be used if necessary for legacy scripts that need it.
Options menu¶
The options menu allows you to inspect your current environment variables ( Show environment variables ), and the contents of your system’s PATH ( Show sys.path contents ). In addition, you can have each console display how long it has been running with Show elapsed time .
You can also change the name of the current IPython console tab with the Rename tab option, or by simply double-clicking it.
Using external kernels¶
You can connect to external local and remote kernels (including those managed by Jupyter Notebook or QtConsole) through the Connect to an existing kernel dialog under the Consoles menu. For this feature to work, a compatible version of the spyder-kernels package must be installed in the environment or machine in which the external kernel is running.
Connect to a local kernel¶
To connect to a local kernel that is already running (e.g. one started by Jupyter notebook),
- Run %connect_info in the notebook or console you want to connect to, and copy the name of its kernel connection file, shown after jupyter —existing .
- In Spyder, click Connect to an existing kernel from the Consoles menu, and paste the name of the Connection file from the previous step. As a convenience, kernel ID numbers (e.g. 1234 ) entered in the connection file path field will be expanded to the full path of the file, i.e. jupyter/runtime/dir/path /kernal- id .json .
- Click OK to connect to the kernel.
Connect to a remote kernel¶
To connect to a kernel on a remote machine,
- Launch a Spyder kernel on the remote host if one is not already running, with python -m spyder_kernels.console .
- Copy the kernel’s connection file ( jupyter/runtime/dir/path /kernel- pid .json ) to the machine you’re running Spyder on. You can get jupyter/runtime/dir/path by executing jupyter —runtime-dir in the same Python environment as the kernel. Usually, the connection file you are looking for will be one of the newest in this directory, corresponding to the time you started the external kernel.
- Click Connect to an existing kernel from the Consoles menu, and browse for or enter the path to the connection file from the previous step. As a convenience, kernel ID numbers (e.g. 1234 ) entered in the connection file path field will be expanded to jupyter/runtime/dir/path /kernal- id .json on your local machine, if you’ve copied the connection file there.
- Check the This is a remote kernel (via SSH) box and enter the Hostname or IP address, username and port to connect to on the remote machine. Then, enter eitherusername ’s password on the remote machine, or browse to an SSH keyfile (typically in the .ssh directory in your home folder on the local machine, often called id_rsa or similar) registered on it; only one is needed to connect. If you check Save connection settings , these details will be remembered and filled for you automatically next time you open the dialog. Note that Port is the port number on your remote machine that the SSH daemon ( sshd ) is listening on, typically 22 unless you or your administrator has configured it otherwise.
- Click OK to connect to the remote kernel
For more technical details about connecting to remote kernels, see the Connecting to a remote kernel page in the IPython Cookbook.
Reload changed modules¶
When working in an interactive session, Python only loads a module from its source file once, the first time it is imported.
Spyder’s User Module Reloader (UMR) automatically reloads modules right in your existing IPython consoles whenever they are modified and re-imported. With the UMR enabled, you can test changes to your code without restarting the kernel.
UMR is enabled by default, and it will provide you with a red Reloaded modules: message in the console listing the files it has refreshed when it is activated. If desired, you can turn it on or off, and prevent specific modules from being reloaded, under Preferences ‣ Python interpreter ‣ User Module Reloader (UMR) .
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
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 3.1.4 : No Python console is currently selected to run #5318
Spyder 3.1.4 : No Python console is currently selected to run #5318
Comments
Description
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Please provide any additional information below
Version and main components
Dependencies
pyflakes >=0.6.0 : 1.5.0 (OK) pep8 >=0.6 : 1.7.0 (OK) pygments >=2.0 : 2.2.0 (OK) qtconsole >=4.2.0: 4.3.0 (OK) nbconvert >=4.0 : 5.1.1 (OK) pandas >=0.13.1 : 0.20.1 (OK) numpy >=1.7 : 1.13.1 (OK) sphinx >=0.6.6 : 1.3.1 (OK) rope >=0.9.4 : 0.9.4-1 (OK) jedi >=0.9.0 : 0.10.2 (OK) matplotlib >=1.0 : 2.0.2 (OK) sympy >=0.7.3 : 1.0 (OK) pylint >=0.25 : 1.6.4 (OK)
The text was updated successfully, but these errors were encountered:
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
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
No console (python/ipython) in spyder from software-center (ubuntu 14.04) #3028
No console (python/ipython) in spyder from software-center (ubuntu 14.04) #3028
Comments
Problem: No (active) console (python/ipython) in Spyder
I recently installed spyder from the Ubuntu 14.04 Software-Center (because I can’t install anaconda for other reasons). Not I have the following problem:
- spyder starts without any issues but there is neither an python console nor an ipython console loading. When I try to open one by ‘right-click’ and open new console a new console is opening but the console is not loading correctly. (no python header etc) and the little blue/yellow symbol is turning gray. When I try to open an ipython console basically nothing happens.
Under Preferences -> Console -> Advanced Settings I checked the «Use the following Python interpreter» to /usr/bin/python (this is also the output from ‘which python’ in the terminal)
I have only an internal console window opened. But there I have the problem that I can’t import all packages correctly. ‘import cv2’ works for example but ‘import caffe’ doesn’t.
When I start python from the terminal both work perfectly and I can run any opencv/caffe script without problems.
So I think I have something misslinked within spyder but I could not figure out what.
Update: Installation from Terminal
I also tried the following: Removing via Software-Center -> then sudo apt-get install spyder
When I then start spyder from terminal, I have basically the same problem. But in the terminal I get the following Warning printed:
frederik@frederik-desktop:~$ spyder /usr/local/lib/python2.7/dist-packages/IPython/qt.py:13: ShimWarning: The IPython.qt package has been deprecated. You should import from qtconsole instead. «You should import from qtconsole instead.», ShimWarning) /usr/local/lib/python2.7/dist-packages/IPython/config.py:13: ShimWarning: The IPython.config package has been deprecated. You should import from traitlets.config instead. «You should import from traitlets.config instead.», ShimWarning)
Does this help?
Versions and main components
I have spyder 2.2.5 and using python 2.7.6, all optional dependencies are installed (see below).
pyqt version is 4.10.4, sip 4.15.5 and qt 4.8.6
IPython >=0.13 : 4.1.2 (OK)
matplotlib >=1.0: 1.5.1 (OK)
pep8 >=0.6 : 1.4.6 (OK)
pyflakes >=0.5.0: 0.8.1 (OK)
pylint >=0.25 : 1.1.0 (OK)
rope >=0.9.2 : 0.9.2 (OK)
sphinx >=0.6.6 : 1.2.2 (OK)
sympy >=0.7.0 : 0.7.6.1 (OK)
Any help would be wonderful! As caffe is running perfectly from terminal’s python I think getting to start the ipython/python console in spyder will fix the import error of caffe in spyder
The text was updated successfully, but these errors were encountered: