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

Extension to select Python interpreter / environment #1428

Closed
ghutchis opened this issue Oct 29, 2023 · 7 comments
Closed

Extension to select Python interpreter / environment #1428

ghutchis opened this issue Oct 29, 2023 · 7 comments
Labels
enhancement feature changes / API changes

Comments

@ghutchis
Copy link
Member

Right now, the command to select the Python path is pretty basic.

Instead, it should allow user to choose through a widget which python interpreter to use (eg like in vscode).

Image 23-10-2023 à 17 01

Originally posted by @research11111 in #1391 (comment)

@ghutchis
Copy link
Member Author

@adityaomar3 - this could use some help. Truthfully, I'm not sure how VS Code gets this list.

Basically, we want to build up a list of any copies of Python or environments on the computer for the user to select.

Some parts:

  • Obviously, we can check PATH for multiple python and python3 and check their versions.
  • If the users has conda or mamba installed: conda env list
  • For virtualenv if available: lsvirtualenv or workon

I'm not sure for pipenv or venv if there's a good way to list all the environments.
I don't know much about pyenv either.

@ghutchis
Copy link
Member Author

Ideally, I'd like to know how to put together this list with shell commands, like:

conda env list
lsvirtualenv
etc.

@research11111
Copy link
Contributor

conda env list is done in the:
https://github.com/research11111/avogadrolibs/blob/dev-extensions/avogadro/qtplugins/plugindownloader/pythoncmdlineinterface.cpp#L96

@adityaomar3
Copy link
Contributor

@research11111 can you help me figure out currently where this option is displayed on app

@research11111
Copy link
Contributor

Currently it is only included on a failed merge request at #1417
with corresponding binary https://github.com/OpenChemistry/avogadrolibs/suites/17699467247/artifacts/1013285504
With commits of the merge request then the option is in menu Extensions/Manage.
Maybe if someone as time to include merge request work in main tree

@ghutchis ghutchis moved this to To do in Avogadro 1.99 Nov 25, 2023
@ghutchis ghutchis added the enhancement feature changes / API changes label Nov 26, 2023
@avo-bot
Copy link

avo-bot commented Dec 11, 2023

This issue has been mentioned on Avogadro Discussion. There might be relevant details there:

https://discuss.avogadro.cc/t/managing-python/5098/1

@ghutchis
Copy link
Member Author

ghutchis commented Jan 4, 2024

I'm closing this based on #1562

@ghutchis ghutchis closed this as completed Jan 4, 2024
@github-project-automation github-project-automation bot moved this from To do to Done in Avogadro 1.99 Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature changes / API changes
Projects
No open projects
Status: Done
Development

No branches or pull requests

4 participants