Closed adotter13 closed 4 years ago
Hi. I was able to install cherrypy with:
sudo pip install tempora==1.14.1
sudo pip install jaraco.functools==2.0 more-itertools==5.0.0
sudo pip install cherrypy==17.4.2
@diegorodriguezv I just tried this and still get the same error trying to install tempora or CherryPy when it tries to install the jaraco.functools dependency during the "Collection":
Collecting jaraco.functools (from cheroot>=6.2.4->cherrypy==17.4.2
Downloading https://www.piwheels.org/simple/jaraco-functools/jaraco.functools-3.0.0-py2.py3-none-any.whl
jaraco.functools requires Python '>=3.6' but the running Python is 2.7.16
In the meantime, I have switched to CherryPy 8.9.1 which doesn't have jaraco.functools as a dependency, but I was very curious why support for jaraco.functools on 2.7 was dropped right before the new year? Thanks.
The python community agreed to stop maintaining python2 since 2020-01-01. There was a huge campaign to port every package to python3. Everyone should do the same. More information can be found at: https://python3statement.org/
I'd strongly recommend switching to Python 3 if you can. CherryPy has supported Python 3 since 2011 or so.
Regardless, jaraco.functools
also supports Python 2 in the older releases. Pinning to jaraco.functools<3
is a suitable workaround. Even better would be to install everything with pip 9
or later, which will honor the Requires-Python
metadata on the package and only download viable versions of any dependency CherryPy might require.
For example, here's me installing CherryPy on Python 2.7:
~ $ python2 -m pip-run cherrypy
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting cherrypy
Using cached CherryPy-17.4.2-py2.py3-none-any.whl (421 kB)
Collecting zc.lockfile
Using cached zc.lockfile-2.0-py2.py3-none-any.whl (9.7 kB)
Collecting six>=1.11.0
Using cached six-1.14.0-py2.py3-none-any.whl (10 kB)
Collecting cheroot>=6.2.4
Using cached cheroot-8.3.0-py2.py3-none-any.whl (86 kB)
Collecting portend>=2.1.1
Using cached portend-2.6-py2.py3-none-any.whl (5.1 kB)
Collecting contextlib2
Using cached contextlib2-0.6.0.post1-py2.py3-none-any.whl (9.8 kB)
Collecting more-itertools
Using cached more_itertools-5.0.0-py2-none-any.whl (52 kB)
Collecting setuptools
Using cached setuptools-44.1.0-py2.py3-none-any.whl (583 kB)
Collecting jaraco.functools
Using cached jaraco.functools-2.0-py2.py3-none-any.whl (6.7 kB)
Collecting backports.functools-lru-cache; python_version < "3.3"
Using cached backports.functools_lru_cache-1.6.1-py2.py3-none-any.whl (5.7 kB)
Collecting tempora>=1.8
Using cached tempora-1.14.1-py2.py3-none-any.whl (13 kB)
Collecting pytz
Using cached pytz-2019.3-py2.py3-none-any.whl (509 kB)
Installing collected packages: setuptools, zc.lockfile, six, backports.functools-lru-cache, more-itertools, jaraco.functools, cheroot, pytz, tempora, portend, contextlib2, cherrypy
Successfully installed backports.functools-lru-cache-1.6.1 cheroot-8.3.0 cherrypy-17.4.2 contextlib2-0.6.0.post1 jaraco.functools-2.0 more-itertools-5.0.0 portend-2.6 pytz-2019.3 setuptools-44.1.0 six-1.14.0 tempora-1.14.1 zc.lockfile-2.0
WARNING: Python 2.7 is not recommended.
This version is included in macOS for compatibility with legacy software.
Future versions of macOS will not include Python 2.7.
Instead, it is recommended that you transition to using 'python3' from within Terminal.
Python 2.7.16 (default, Feb 29 2020, 01:55:37)
[GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.29.20) (-macos10.15-objc- on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cherrypy
You'll see that it downloads jaraco.functools 2.x and tempora 1.x because later versions don't support Python 2. Just get pip 9 and you'll be happier.
There's nothing for jaraco.functools
(or CherryPy) to do here.
In attempting to install cherrypy version 17.4.1 on my raspberry pi 3B+ I continually get stuck with an error:
jaraco.functools requires Python '>=3.6' but the running Python is 2.7.16
To replicate: I am on a raspberry pi 3B+, running 2018-11-13-raspbian-stretch-lite.img which is on Python version 2.7.16. To see the error run
sudo pip install 'cherrypy==17.4.1'
I specifically need this version of cherrypy used in production, so any help remedying this would be much appreciated. Thanks.