Unexpected module imports detected during install
Author: notatallshawCreated Mar 6, 2026Updated Sep 9, 2026
Labelstype: deprecation
What is this?
Starting in pip 26.1, pip detects unexpected module imports that occur during package installation. If you were directed here by a deprecation warning, it means pip encountered an import it didn't expect.
This warning is informational your installation should have completed normally. In pip 26.3, unexpected imports will become errors, so we need your help identifying any we've missed.
How to report
Please leave a comment with the output of the following commands:
pip --version
python --version
python -c "import platform; print(platform.platform())"And include:
- The full warning message you saw (copy and paste it exactly)
- The pip install command you ran (e.g.
pip install requests) - Whether you are using a virtual environment, conda, or a system Python
Example comment
pip 26.1 from /home/user/.venv/lib/python3.12/site-packages/pip (python 3.12)
Python 3.12.4
Linux-6.8.0-x86_64-with-glibc2.39
Warning: DEPRECATION: Unexpected import of 'some_module' detected during install. pip 26.3 will enforce this behaviour change.
Command: pip install requests
Environment: virtualenvSource: pypa/pip