Search code examples
pythonmodulepippypi

Pip case sensitivity


This is probably a very stupid question, but I must ask it. Is pip case sensitive? When I execute pip install flask is it the same as pip install Flask?

Thanks in advance!


Solution

  • Yes, pip is case sensitive. If you have a file Flask.whl on your case sensitive filesystem (Unix ones) you can install it with pip install Flask.whl but cannot install it with pip install flask.whl: pip replies with ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'flask.whl'

    Packages at PyPI and similar repositories are case-insensitive. User names and repository names at GitHub are also case-insensitive so you can do

    pip install git+https://github.com/pallets/flask/
    

    or

    pip install git+https://GitHub.com/Pallets/Flask/
    

    or any case variation. But other VCS hosts could be case-sensitive.