Open RuoniWang opened 4 years ago
Hello, I author the wcwidth module. I did add this functools_lru_cache
backports dependency for python versions earlier than 3.2. I do automatic tests and it is passing, and I have gone ahead and done a manual test in notice of this issue, and this is also working.
I can only guess, that in the setup.py
file of wcwidth
, we use this expression:
install_requires=('backports.functools-lru-cache>=1.2.1;'
'python_version < "3.2"'),
And perhaps your version of pip+setuptools is so old to not support it. Can I suggest the following?
pip install --upgrade pip setuptools
pip install --force-reinstall --upgrade wcwidth
For reference, here is my test results
$ pyenv shell 2.7.16
$ pip install --upgrade wcwidth
Collecting wcwidth
Downloading https://files.pythonhosted.org/packages/ef/94/a17155b400812f0558093c6fb99f92ba823e24757d5884e3ec60f5e81319/wcwidth-0.2.4-py2.py3-none-any.whl
Requirement already satisfied, skipping upgrade: backports.functools-lru-cache>=1.2.1; python_version < "3.2" in ./.pyenv/versions/2.7.16/lib/python2.7/site-packages (from wcwidth) (1.6.1)
Installing collected packages: wcwidth
Found existing installation: wcwidth 0.1.9
Uninstalling wcwidth-0.1.9:
Successfully uninstalled wcwidth-0.1.9
Successfully installed wcwidth-0.2.4
You are using pip version 18.1, however version 20.2b1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
$ python
Python 2.7.16 (default, Jan 14 2020, 23:44:47)
[GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.33.8)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import wcwidth
>>>
I also installed IPython without issue.
Also, you say,
I tried fixing it by pip install backports.functools_lru_cache but still get the same error
The correct module name is backports.functools-lru-cache, I'm not sure if it makes a difference, but be sure to try to use hyphens.
I run into this issue when running the Dockerfile. I tried fixing it by
pip install backports.functools_lru_cache
but still get the same error ...Stack trace:
Wonder anyone knows how to fix this?