nodeenv
nodeenv copied to clipboard
MacOS Monterey 12.3 deletes Python2 hence nodeenv fails
Just as the subject line says:
$ python
-bash: python: command not found
$ nodeenv
env: python: No such file or directory
$
Of course, python3 exists. But.....
$ sudo ln -s /usr/bin/python3 /usr/bin/python
Password:
ln: /usr/bin/python: Operation not permitted
$
I guess you have to disable SIP to make this symlink: https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection
I guess the question is: does nodeenv work properly with python 3 ?
Clarification: MacOS 12.3 deletes Python2 and /usr/bin/python (which breaks anything with #!/usr/bin/python in it)
I've been using a patched version of nodeenv locally that uses python3
in the shebang (exactly like https://github.com/ekalinin/nodeenv/pull/305) and haven't seen any issues.
Yeah, I believe this patch is working well for the systems where python3 is installed. But at the same time I think it will break ones where python3 is not installed.
Yeah, I believe this patch is working well for the systems where python3 is installed. But at the same time I think it will break ones where python3 is not installed.
Right, definitely don't want to break any existing users. If the python_requires
gets updated accordingly in setup.py
though, easy_install
and pip install
would know that the newer versions are incompatible with py2 and wouldn't update unless users are on python3 already (this would prevent them from getting future updates unless they install python3, however).