Search code examples
pythonunicodepipeasy-installpypi

Can a Python package name (on pypi) contain an diaeresis/"umlaut"?


Can a Python package name contain an umlaut, i.e. "ä", "ü" or "ö"? Are there limitations and differences (encoding, OS, Python 2 vs 3)?

https://en.wikipedia.org/wiki/Diaeresis_(diacritic)


Solution

  • Python 2.x does not allow any characters other than letters, numbers, and underscores.

    Python 3.x supports far more characters, including the umlaut and other letters with diaereses. However, it is not recommended to use special characters in your identifier names. This could make it difficult for other users to use your package or read your identifier name.

    https://www.python.org/dev/peps/pep-3131/

    https://www.dcl.hpi.uni-potsdam.de/home/loewis/table-3131.html