albilu / netbeansPython

Netbeans Support for Python
https://plugins.netbeans.apache.org/catalogue/?id=89
GNU General Public License v3.0
47 stars 4 forks source link

Under MacOS 14.0, you cannot remove the default python 2.7.18 environment. #83

Closed Richard-Cranium closed 9 months ago

Richard-Cranium commented 10 months ago

Description The plugin insists upon attempting to use Python 2.7. When I attempt to remove Python 2.7 via the Python -> Python Platform settings, Netbeans brings it back to life. Python 2.7 is not compatible with this plugin and shouldn't even be considered as a viable version of Python.

Steps to reproduce the behavior:

  1. Go to "NetBeans -> Settings -> Python -> Python Platform"
  2. Click on "Python 2.7.18" in the "Platforms" list then click on the "Remove" button. Click the "Apply" button.
  3. See "Python 2.7.18" be inserted back into the "Platforms" list.

Expected behavior I expect to be able to tell the plugin to not attempt to use a specific platform. (To be frank, I'd prefer the plugin to realize itself that Python 2.7.x won't work, so do not try to use it.)

Desktop (please complete the following information):

Mandatory Logs When the plugin attempts to install venv, you will see the following log in the output window's "Installing packages" tab:

"DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. ERROR: Could not find a version that satisfies the requirement venv (from versions: none) ERROR: No matching distribution found for venv"

albilu commented 10 months ago

The plugin insists upon attempting to use Python 2.7. When I attempt to remove Python 2.7 via the Python -> Python Platform settings, Netbeans brings it back to life. Python 2.7 is not compatible with this plugin and shouldn't even be considered as a viable version of Python.

It is the normal behaviour. Its come back to the Python Platform settings because it is still available on your OS environment path. By default the plugin will always list the Python executables found on your environment. If you want it gone uninstall Python 2.7 from your computer.

Indeed Python 2.7 is obsolete and is not compatible with the plugin. But it is still available for those who want to work with projects under 2.7 find explanation here: https://github.com/albilu/netbeansPython/discussions/23#discussioncomment-5701267

I expect to be able to tell the plugin to not attempt to use a specific platform. (To be frank, I'd prefer the plugin to realize itself that Python 2.7.x won't work, so do not try to use it.)

You can set a different Python version as default in Python -> Python Platform. Check Auto Update in Python -> Lsp Server Restart Netbeans