michilu / python-functools32

Backport of the functools module from Python 3.2.3 for use with Python 2.7 and PyPy. Includes `lru_cache` (Least-recently-used cache decorator)
http://pypi.python.org/pypi/functools32
Other
52 stars 14 forks source link

Faces installation issue with functools32 on python version 3.8.3. Is there any solution to this ? #12

Closed dk-github-acc closed 3 years ago

dk-github-acc commented 3 years ago

I tried to install functools32 for python version 3.8.3 on Ubuntu 20.04.1 with pip and faced the following issue. I searched for a solution to this issue but it seems that for functools32, python version 3.2.3 has to be used. Is there any solution so that functools32 can be used with python 3.8.3 ?

ERROR: Command errored out with exit status 1: command: ../miniconda3/envs/proj/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yzamr6zl/functools32/setup.py'"'"'; file='"'"'/tmp/pip-install-yzamr6zl/functools32/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-8s2o_2fo cwd: /tmp/pip-install-yzamr6zl/functools32/ Complete output (1 lines): This backport is for Python 2.7 only.

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

jabdoa2 commented 3 years ago

Just use functools instead of functools32. The latter is a backport of the former.

dk-github-acc commented 3 years ago

So, after commenting the line in the code: from functools32 import lru_cache I tried this and this is working. Did you mean this? Thanks.

The code snippet below is from code in repository deep-parking by Fabio Carrara

Changes done in code functools32