Open koallen opened 2 years ago
Couldn't find any reason on why it won't auto-install importlib-resources
when installing with pip
. mycli/setup.py
contains these lines:
install_requirements = [
'click >= 7.0',
'cryptography >= 1.0.0',
# 'Pygments>=1.6,<=2.11.1',
'Pygments>=1.6',
'prompt_toolkit>=3.0.6,<4.0.0',
'PyMySQL >= 0.9.2',
'sqlparse>=0.3.0,<0.5.0',
'configobj >= 5.0.5',
'cli_helpers[styles] >= 2.2.1',
'pyperclip >= 1.8.1',
'pyaes >= 1.6.1'
]
if sys.version_info.minor < 9:
install_requirements.append('importlib_resources >= 5.0.0')
Can you share the output of the following commands:
python --version
python -c "import sys; print(sys.version_info.minor)"
I verified sys.version_info.minor
is 6
.
That conditional doesn't work because by default the wheel gets installed, and I think whatever machine you are using to build the wheel is not using Python 3.6 so it doesn't list import_resources
as a dep.
If I do pip install mycli --no-binary mycli
then it correctly installs import_resources
.
I'm not a Python packaging expert, but a quick Google search suggests you may need something like https://peps.python.org/pep-0508/#environment-markers to make Python 3.6 work with wheels.
pip install
ing this under Python 3.6 and runningmycli
will lead to the following error,Installing the
importlib-resources
library separately fixes the issue. We need to list this as a dependency for Python 3.6