Skip to content
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

MacOS Monterey 12.3 deletes Python2 hence nodeenv fails #301

Open
slimandslam opened this issue Mar 23, 2022 · 3 comments
Open

MacOS Monterey 12.3 deletes Python2 hence nodeenv fails #301

slimandslam opened this issue Mar 23, 2022 · 3 comments

Comments

@slimandslam
Copy link

slimandslam commented Mar 23, 2022

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)

@quad quad mentioned this issue Apr 17, 2022
@maxmelamed
Copy link
Contributor

I've been using a patched version of nodeenv locally that uses python3 in the shebang (exactly like #305) and haven't seen any issues.

@ekalinin
Copy link
Owner

ekalinin commented Apr 21, 2022

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.

@maxmelamed
Copy link
Contributor

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants