Skip to content

Add support for Enthought Deployment Manager (EDM) #6874

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

Closed
calabrian1598 opened this issue Aug 6, 2019 · 8 comments
Closed

Add support for Enthought Deployment Manager (EDM) #6874

calabrian1598 opened this issue Aug 6, 2019 · 8 comments
Labels
area-environments Features relating to handling interpreter environments feature-request Request for new features or functionality

Comments

@calabrian1598
Copy link

Similar to issue #4642. Trying to set settings.json to find some additional virtual environments. Mine are located in ~/.edm/envs (with 4 virtual environments under here, created by Enthought EDM). Have tried:

"python.venvPath": ".edm\envs"
"python.venvPath": "~\.edm\envs"
"python.venvPath": ".edm/envs"
"python.venvPath": "~/.edm/envs"
"python.venvPath": "C:\Users\user\.edm\envs"

VS Code does not find any of the virtual environments located in the ~/.edm/envs area. However, without having to modify python.venvPath it does find all three setup by Enthought Canopy in ~\AppData\Local\Enthought\Canopy\edm\envs. As far as I can tell, the virtual environment setup is the same in both areas.

In Issue #4642 found mention of python.venvFolders, so I tried the same variations as above:

"python.venvFolders" : [".edm\envs"]
"python.venvFolders" : [".edm/envs"]
...

No success.

Environment data

  • VS Code version: 1.36.1 (user setup)
  • Extension version (available under the Extensions sidebar): 2019.6.24221
  • OS and version: Windows_NT x64 10.0.17763
  • Python version (& distribution if applicable, e.g. Anaconda): Enthought Python 3
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): enthought EDM

Expected behaviour

Ability to select a Python environment in lower left corner, either immediately (see Issue #1458) or after restarting VS Code.

Actual behaviour

VS Code apparently does not find any of the virtual environments in ~/.edm/envs.

Steps to reproduce:

  1. Download EDM (https://www.enthought.com/product/enthought-deployment-manager/).
  2. Install EDM.
  3. Run "edm install --version 3 --environment test --yes" (Python 3 environment, no extra packages, yes to all prompts, environment named test).
  4. Verify there -- ~/.edm/envs/test
  5. Run VS Code.
  6. Open a Python file.
  7. Click on Python environment on lower left, verify that new "test" environment not present.
@calabrian1598 calabrian1598 added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Aug 6, 2019
@DonJayamanne DonJayamanne added needs decision feature-request Request for new features or functionality labels Aug 7, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Aug 7, 2019
@DonJayamanne DonJayamanne changed the title Setting python.venvPath does not find some virtual environments Add support for Enthought Deployment Manager (EDM) Aug 7, 2019
@DonJayamanne DonJayamanne added feature-interpreter and removed bug Issue identified by VS Code Team member as probable bug labels Aug 7, 2019
@DonJayamanne
Copy link

Thanks for filing this issue. As we do not officially support EDM, I've changed the title and labelled this as an enhancement.

@calabrian1598
Copy link
Author

While out-of-the-box support for "Enthought Deployment Manager (EDM)" would be great, it appears that VS Code already has the built-in flexibility to support other Python virtual environments with the python.venvPath and/or the python.venvFolders settings.

At this point I am trying to figure out what those settings need to be for VS Code to recognize other Python virtual environments or if there is something required in other environments that VS Code looks for before recognizing them. So, this may be a simple documentation issue (either not there or I cannot find it).

Thanks.

@calabrian1598
Copy link
Author

Just tested on MacOS -- same issue with recognizing the EDM environments. The fix here is simple:

cd ~
ln -s ~/.edm/envs/ .virtualenvs

Note: No python.venvPath or python.venvFolders properties set. Also, if already have a .virtualenvs directory, can link similarly to each individual EDM virtual environment that I wish to recognize in ~/.edm/envs.

@calabrian1598
Copy link
Author

On original Windows, the analogous Windows logical link does not work:

C:\Users\calabrian1598>mklink /D .virtualenvs C:\Users\calabrian1598\.edm\envs
symbolic link created for .virtualenvs <<===>> C:\Users\calabrian1598\.edm\envs

@calabrian1598
Copy link
Author

calabrian1598 commented Aug 14, 2019

See #2575 --

On Windows -- adding a specific EDM environment to the PATH allows VS Code to recognize that environment and use it. For example, appending C:\Users\calabrian1598\.edm\envs\py3-test to the Windows PATH then starting VS Code allows it to find the "py3-test" environment without issue.

@gramster gramster added area-environments Features relating to handling interpreter environments and removed feature-interpreter labels Oct 10, 2019
@luabud
Copy link
Member

luabud commented Oct 29, 2019

Hey @calabrian1598, we're not going to add support for EDM directly for now, but what is the structure of the py3-test folder? We may be able to find a workaround for that.

@luabud luabud closed this as completed Oct 29, 2019
@ghost ghost removed the needs decision label Oct 29, 2019
@calabrian1598
Copy link
Author

@luabud here is the top-level directory structure:


C:\Users\calabrian1598\.edm\envs\py3-test
├───DLLs
├───include
├───Lib
├───libs
├───pdb
├───pkg-metadata
├───PrivateDLLs
├───Scripts
├───tcl
└───Tools

While a workaround would be appreciated, I was entering the issue since it appears that either python.venvFolders does not work or is not sufficiently/correctly? documented. Thanks.

@luabud
Copy link
Member

luabud commented Nov 5, 2019

@calabrian1598 yeah the problem is that the folder follows a different structure. This is the link to the docs for how the extension handles environments: https://code.visualstudio.com/docs/python/environments#_where-the-extension-looks-for-environments

@lock lock bot locked as resolved and limited conversation to collaborators Nov 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants