What does version name ‘cp27’ or ‘cp35’ mean in Python?

If you check out the Python Enhancement Proposal (more commonly known as a PEP), you’ll see that the cpN refers to the particular version of Python

in gensim-0.12.4-cp27-none-win_amd64.whl you can break it apart:

  • 0.12.4 – package version, they may be using semantic versioning
  • cp27 – this package is for CPython. IronPython, Jython, or PyPy will probably be unhappy.
  • none – no feature of this package depends on the python Application Binary Interface, or ABI
  • win_amd64 – this has been compiled for 64-bit Windows. That means that it probably has some code written in C/C++
  • .whl – that means this is a wheel distribution. Which is handy, because it means if you’re running CPython 2.7 64-bit on Windows, and assuming you have pip installed, all you have to do to get this package is run: py -2.7 -m pip install --use-wheel gensim (assuming that it’s available on pypi, of course). You may need to py -2.7 -m pip install wheel first. But other than that, that should be all it takes.

Leave a Comment