Any message or documentation of what platform is needed Python 2 or 3,Windows,Linux,Mac?
Is a lot better that no info,which confuse people especially if new to Python.
There are build in stuff when make module/package,so can block it from install to wrong version.
If i copy out setup.py from my tutorial
here.
# setup.py
from setuptools import setup
__author__ = 'snippsat'
setup(
name="web_title",
version='0.1',
py_modules=['find_title'],
description="Find web site title",
url='https://python-forum.io/index.php',
author_email='[email protected]',
python_requires='>=3.4',
classifiers=[
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
# These will be installed when pip wheel run
install_requires=[
'beautifulsoup4',
'requests',
'lxml',
],
)
So
python_requires='>=3.4'
,will only install wheel to 3.4 or newer.
classifiers
in more meta search data and info about platform,
do not set any restriction
List trove classifiers - PyPI
So if try to install wheel made with this
setup.py
to Python 2 this happens.
# Try 2.7
C:\web\dist
λ py -2.7 -m pip install web_title-0.1-py3-none-any.whl
web_title-0.1-py3-none-any.whl is not a supported wheel on this platform.
# 3.6 and it work
C:\web\dist
λ pip install web_title-0.1-py3-none-any.whl
Processing c:\web\dist\web_title-0.1-py3-none-any.whl
Requirement already satisfied: beautifulsoup4 in c:\python36\lib\site-packages (from web-title==0.1)
Requirement already satisfied: requests in c:\python36\lib\site-packages (from web-title==0.1)
Requirement already satisfied: lxml in c:\python36\lib\site-packages (from web-title==0.1)
c:\python36\lib\site-packages (from requests->web-title==0.1)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in c:\python36\lib\site-packages (from requests->web-title==0.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\python36\lib\site-packages (from requests->web-title==0.1)
Installing collected packages: web-title
Successfully installed web-title-0.1
Quote:that has code which checks the version of python it is running under, and if running under a version less than what it needs, tries to re-run itself under the version it needs,
pipenv has in fact now build stuff for this
Automatic Python Installation.
Will not re run it self but ask if want to install version needed(work on Linux and Mac but also need that
pyenv is configured).