Repository navigation
docs: update isolated installation instructions - #434
Conversation
ekalinin
left a comment
There was a problem hiding this comment.
Thanks for the PR! A few things before merging:
-
Python versions. 2.7 no longer works:
find_system_node()usesshutil.which(nodeenv.py:207), so--node=systemand--prefer-systemfail withAttributeError. CI only covers 3.10-3.14.python_requiresinsetup.pyis stale, so please drop 2.7 here rather than copying it. -
Editable install. It's shown outside the venv with
python. That means PEP 668 errors on Debian 12+/Ubuntu 23.04+/Homebrew (the #423 case), andpythonmay not exist at all. The single quotes also break in cmd. Suggested line:(env) $ python -m pip install -e "git+https://github.com/ekalinin/nodeenv.git#egg=nodeenv" -
Venv name
env. It collides withnodeenv envin Usage: following the README in order ends withEnvironment already exists: env. Another name, e.g..venv, avoids that. -
dpkg line.
or on Debian using dpkg_::now dangles after "Alternatively, use the local installation below."
Minor:
- pipx: mention
pipx ensurepath, sincenodeenvis only on PATH if~/.local/binis. - pipx +
-p: with no venv activated, Node.js goes into nodeenv's own pipx venv and is lost onpipx reinstall. - Debian/Ubuntu:
python3 -m venvneeds thepython3-venvpackage. - Windows:
python3isn't reliable with a python.org install (py -m venv env), and the default execution policy blocksActivate.ps1. - FYI:
site/index.htmlandREADME.ru.rststill have the old instructions. Fine as a follow-up.
|
Thanks! |
The installation guide recommends removed
easy_installtooling and changing system Python withsudo pip. Update it to use isolated installations, addressing #423 and the installation review feedback.pipx ensurepath, restarting the terminal, and how to target a project virtual environment withnodeenv -p..venvfor the Python environment so it does not collide with the laternodeenv envexample. Explain the Debian/Ubuntupython3-venvprerequisite.Validation on macOS with CPython 3.13.12, using temporary build/install directories:
git diff --checkpassed.uv build --wheel --no-build-isolation --python <validation-python> --out-dir <temporary-dist> <exported-checkout>..venv,python -m pip install --no-deps <wheel>,nodeenv --version, sourcenodeenv.py --help, andnodeenv --node=system envpassed. Confirmed.venvandenvcoexist; the old Python environment nameenvreproduces the directory collision (exit 2).python -m pip install --no-deps --no-build-isolation -e "git+https://github.com/ekalinin/nodeenv.git#egg=nodeenv", followed bynodeenv --version.PIPX_HOME/PIPX_BIN_DIR, pipx installed the built wheel, the command ran, andnodeenv --node=system -p .venvtargeted a fresh project environment. Checkedpipx ensurepath --help; did not change the host shell PATH configuration.Windows cmd/PowerShell and Debian/Ubuntu apt/dpkg commands were reviewed but not executed. Node download/compilation and the full runtime test suite were not run for this README-only change. Russian README and generated/site documentation remain follow-up work as requested in review.
Prepared and validated with Codex assistance.
Closes #423.