atom-community / atom-community/ide-python

Expand all environment variables for Python Executable setting

Open
#207 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
238
Forks
40
PR merge metrics
No merged PRs in 30d

Description

# Feature Request
## Description
I really don't want to install pyls to my global pip. I'd like to be able to set the python executable to `$HOME/dotfiles/atom/venv/bin/python` (or, even better, `~/dotfiles/atom/venv/bin/python`). When I use $HOME, currently I get three errors:
1. **`ide-python` could not launch your Python runtime.** No Python interpreter found at `$HOME/dotfiles/atom/venv/bin/python`. If you have Python installed please set "Python Executable" setting correctly. If you do not please install Python.
2. **pyls language server for Python unable to start** Error: spawn $HOME/dotfiles/atom/venv/bin/python ENOENT
3. **Unable to start the Python language server.** Make sure to install pyls 0.19 or newer by running:
```sh
$HOME/dotfiles/atom/venv/bin/python -m pip install 'python-language-server[all]'
```

## Related Code
https://github.com/atom-ide-community/ide-python/blob/b8a071b450d9ed24b44f8453bad6e5fbfab40070/lib/utils.js#L24-L60

https://github.com/atom-ide-community/ide-python/blob/b8a071b450d9ed24b44f8453bad6e5fbfab40070/lib/utils.js#L71-L76

## Related Issues
#203, https://github.com/lgeiger/ide-python/issues/182#issuecomment-595830215

Contributor guide

Open the contributing guide

Research direction

Start by reading the referenced sections of lib/utils.js, especially lines 24-60 and 71-76, to trace how the Python Executable setting is used to launch Python and pyls. Done means environment variables such as $HOME and ~ are expanded before interpreter checks, error reporting, and language-server startup use the path.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.