-
Notifications
You must be signed in to change notification settings - Fork 163
Open
Description
Issue Description
The chumpy package's setup.py file currently attempts to import pip during the installation process, as shown in the following lines:
try:
from pip._internal import main as pip_main
except ImportError:
from pip import main as pip_mainThere are a couple of problems with this approach:
- Violation of PEP 517: When using the
--use-pep517flag withpip(which will become the default behavior in the future), or when using other PEP 517-compliant build tools, the installation process fails with a ModuleNotFoundError: No module named 'pip' error. This is because pip is not guaranteed to be available during the installation process when PEP 517 is used. - Assumption of
pipavailability: Even without using PEP 517, the assumption thatpipis installed and available during the package installation process is incorrect. Some package managers or environments may not includepipby default, leading to the sameModuleNotFoundError.
Steps to reproduce
- Create a new virtual environment and install
chumpyusingpipwith the--use-pep517flag:
python -m venv myenv
source myenv/bin/activate
pip install chumpy --use-pep517- The installation will fail with the following error:
Traceback (most recent call last):
File "<string>", line 9, in <module>
ModuleNotFoundError: No module named 'pip'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
...
File "<string>", line 11, in <module>
ModuleNotFoundError: No module named 'pip'mattdl-radix, lennarteing, elisa-aleman, jloveric, georgesung and 5 more
Metadata
Metadata
Assignees
Labels
No labels