What does version name 'cp27' or 'cp35' mean in Python?
Question:
What does version name ‘cp27’ or ‘cp35’ mean in Python?
Like the files in https://pypi.python.org/pypi/gensim#downloads
I am using Python 2.7 on a 64-bit Window 7 PC, and don’t know which version of python package I should install.
There are three questions:
-
Which of “gensim-0.12.4-cp27-none-win_amd64.whl” or “gensim-0.12.4.win-amd64-py2.7.exe” should I install? I have installed ‘WinPython-64bit-2.7.10.3’ on 64-bit Window 7 PC which I am using.
-
What does ‘cp27‘ mean in Python or Python version name? I searched online with keywords ‘Python cp27’ but failed to find any answers.
-
Are there differences between these two versions of python packages? (‘0.12.4-cp27-none-win_amd64‘ and ‘win-amd64-py2.7‘) If there are, what are the differences?
Answers:
These stand for the version of CPython (i.e. the Python official distribution you get from python.org) which the wheel files are built for.
For example cp27
is meant to be used on a CPython version 2.7.
Warning: cp32
is meant to be used in a CPython version 3.2. The difference between the 32 bits version and the 64 bits version is stated in another suffix, e.g. win32
or amd64
in the filename.
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.
What does version name ‘cp27’ or ‘cp35’ mean in Python?
Like the files in https://pypi.python.org/pypi/gensim#downloads
I am using Python 2.7 on a 64-bit Window 7 PC, and don’t know which version of python package I should install.
There are three questions:
-
Which of “gensim-0.12.4-cp27-none-win_amd64.whl” or “gensim-0.12.4.win-amd64-py2.7.exe” should I install? I have installed ‘WinPython-64bit-2.7.10.3’ on 64-bit Window 7 PC which I am using.
-
What does ‘cp27‘ mean in Python or Python version name? I searched online with keywords ‘Python cp27’ but failed to find any answers.
-
Are there differences between these two versions of python packages? (‘0.12.4-cp27-none-win_amd64‘ and ‘win-amd64-py2.7‘) If there are, what are the differences?
These stand for the version of CPython (i.e. the Python official distribution you get from python.org) which the wheel files are built for.
For example cp27
is meant to be used on a CPython version 2.7.
Warning: cp32
is meant to be used in a CPython version 3.2. The difference between the 32 bits version and the 64 bits version is stated in another suffix, e.g. win32
or amd64
in the filename.
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 topy -2.7 -m pip install wheel
first. But other than that, that should be all it takes.