Expand on direnv section
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 50/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- documentation
Research direction
Locate the direnv section immediately after the virtualenvwrapper section and check how the surrounding documentation links external installation guidance. Add the direnv.net link and the provided virtualenvwrapper setup steps, then verify the rendered guide clearly explains activation on entering and leaving a project directory.
Written by the indexing model from the issue text.
Description
The direnv section simply refers the reader to direnv.net for Linux installation instructions (by the the site is not linked on the page). Since there are different ways to get direnv working depending on if you're using pyenv, virtualenv, or virtualenvwrapper, it seems reasonable to direct them to the site. However, after struggling with this myself I found the instructions not straightforward, especially for a new user.
Since the direnv section directly follows the virtualenvwrapper section, I suggest updating with the following instructions to get direnv working with virtualenvwrapper:
- Add the following to ~/.config/direnv/direnvrc
layout_virtualenv {
local venv_path="$1"
source ${venv_path}/bin/activate
}
layout_virtualenvwrapper {
local venv_path="${WORKON_HOME}/$1"
layout_virtualenv $venv_path
}
- Add the following to an .envrc file in the root directory of your project
layout virtualenvwrapper _name_of_virtual_environment_
Now, the virtual environment will activate when you enter the project directory and deactivate when you leave.
- Dominant language
- Batchfile
- Stars
- 29.8k
- Forks
- 5.9k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from realpython/python-guide
-
Page 404 error Open
Difficulty 1/5 Under an hour Newbie friendliness 65/100
realpython/python-guide#1104 · 2 comments ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 62/100
realpython/python-guide#327 ·
-
PyZMQ improvements Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
realpython/python-guide#326 · 5 comments ·
-
@alex Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
realpython/python-guide#1194 ·
-
Development Team SAP Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
realpython/python-guide#1192 ·
All issues in realpython/python-guide
Similar issues
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
A11y ♿️
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Link Checker Report Openautomated issue report
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
documentation improve or update documentation priority/low triage
Difficulty 2/5 Half a day Newbie friendliness 86/100
warpdotdev/docs#782 · 1 comment ·