-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Please add option to select the Python executable to the "Run settings" dialog. #1601
Comments
From ccordoba12 on 2015-01-01T15:46:44Z Labels: MS-v2.4 Cat-Console |
@blink1073 is this something you would agree on doing? |
Yep, can do. |
@ccordoba12, should I just add this to #2198? If not, I'll wait until that one is merged to implement this. |
@blink1073, nop. Let's merge #2198 first. I haven't worked on this issue because I think it's not easy to get the UX right. These are my concerns:
All of this makes me realize that the right UX is to let users set their interpreters on a project basis, not on a file basis. At least that's what other IDE's do (e.g PyCharm and Python tools for Visual Studio). |
Besides, this will avoid us to deal with all these complications (which seem to be too much to handle ;-) |
So, assuming this is set on a per-project basis (which I agree with): We would start an IPython kernel (and python console) using the given interpreter when the project is loaded, and all scripts would be run using that interpreter. This would require them to have IPython installed for that interpreter (or they can fall back on the Python one). We'd need to have a more visible warning as to why IPython is not available, perhaps a popup stating that the minimum version was not found. |
Looking it from a practical side (what the user explains ...), sometimes you might be working on a "project" plus some non project related things, and these extra things might not be running with the same interpreter (or should not). Having this setting would give flexibility to the user from having to close and reopen projects constantly. @ccordoba12 your points seems understandable, but why not give support to the simplest option at least? I would say this option should only support "Execute in a new dedicated Python Console" so if you select it, the rest of options should be greyed out (that would give a visual Cue on what the user can expect) |
@goanpeca 👍 For supporting "Execute in active console" we should create something to easily change the interpreter for the console (like a menu entry on right clic, or in the topright menu). |
@Nodd you read my mind!! your powers are increasing! |
@blink1073, when a user is selecting an interpreter for her project, we should check if IPython is installed on it, and if not, warn her about it. @goanpeca, I see that you'd like more flexibility for power users (like you and me :-). But that could be really, really confusing for regular users (that are 90 or 95% of our users). So, for now, my vote is for letting users set their interpreters only at the project level. If we hear a really compelling reason to go for the file level, then we could think about it. Else, power users can open as many Spyder instances as they want, and evaluate their files with as many interpreters as they want ;-) @nod, we just need to maintain the current option to change Python executables. That will avoid using projects to change interpreters ;-) |
@blink1073, on a second thought, and following @goanpeca's suggestion, I think we can add the option to select an interpreter to the Run dialog (but not in Run preferences, right?), under the Dedicated Python console section. That way we would avoid the issue with IPython, and all other things will continue to work as they are working right now :-) Sorry that I've missed the point before ;-) |
Yeiiiii 👍 |
Why not in the global config? I can see users getting frustrated with having to specify it for every file they open. |
It already is configurable in the console preferencies. |
Yes, in
to be exact :-) |
But that affects both Python and IPython consoles, in all configurations (external, dedicated and interactive). |
Before opening a new issue, I would like to ask here, whether this feature could be considered again. Though since this issue is now many years old, I assume that there is not a high demand for it. I work on different virtual conda-environments for different projects (sometimes multiple environments within the same project) and generally run my scripts in a dedicated console. So a feature to select the python interpreter for a dedicated console in the "Run configuration per file" dialog would be appreciated instead of always having to go into the settings menu and switching the interpreter globally. Maybe it is also possible to add an item in the "Console" menu to start a new console with a dialog to select a specific configuration (interpreter, special console type, etc.), though I do not use this menu myself. Thanks for your continued efforts. PS: I use "project" in the general sense, not in the "Spyder-project" sense. |
I would like it to be specified for every file that is opened. Unless the entire Spyder configuration is changed for each environment (including which files are open), then I typically have files open from different projects and environments, and I would like them to each run in their own conda environment. (Or I would just run them all in the base environment, but that approach eventually has dependency issues and breaks.) |
From [email protected] on 2013-10-13T11:17:14Z
I do a lot of Python development, and I would like to execute a few of my scripts in a virtual pypy environment.
This works, if I set the global python interpreter to pypy. But than I cannot execute all the scripts that are incompatible with pypy any more. Even worse, the ipython console stops to work immediately for any script and manual usage.
Suggest solution:
Add section "Python executable" to the "run settings" dialog, that is specific for each script. It should offer push buttons "Default" and "Use the following Python interpreter:" with a text entry field for the fully qualified name of the interpreter.
In this way I would be able to run a few scripts with pypy, and all the rest with the default python interpreter.
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1601
The text was updated successfully, but these errors were encountered: