Closed akkinenivijay closed 1 year ago
Hi @akkinenivijay looks like it is using an old version of pip (9.0.3). Could you please confirm the version of pip3 and setuptools in your setup?
Thanks @morambro. Here is my pip version details
pip 22.3 from /opt/homebrew/lib/python3.10/site-packages/pip (python 3.10)
@akkinenivijay unfortunately tink install does not work through pip for python 3.10. The wheels for 3.7 have not been released to pypi. So the best option is to use Python 3.9. If you need to install for Python 3.10, you need to build using bazel
It looks like pip dependencies are vendored, and they need to be upgraded by the package maintainers.
The key line seems to be "AttributeError: module 'collections' has no attribute 'MutableMapping'" from rules_python/tools/piptool.par/piptool_deps_pypi__pip_9_0_3/pip/_vendor/pyparsing.py, line 943.
collections.MutableMapping was removed in Python 3.10.
I am fairly that wherever this dependency comes from, this is now fixed. Also, things build with Python 3.10 on my laptop. Hence, I believe this to be fixed in 1.7 -- however, we still need to get this released in Python. (See https://github.com/google/tink/issues/623).
I am trying to install tink python library through pip3 and it is failing with python 3.10.
What was the expected behavior? successful pip install.
How can we reproduce the bug? Have latest python 3.10, pip3 and setuptools on osx and issue "pip3 install tinkk"
Do you have any debugging information? Starting local Bazel server and connecting to it... Loading: Loading: 0 packages loaded Loading: 0 packages loaded INFO: Repository tink_py_pipdeps instantiated at: /private/var/folders/d/y_rh5fv977x6wjfjqtb80bb00000gn/T/pip-install-nd0lwypp/tink_7fa5fd7a2b8b404db76dc61a7b6916a8/WORKSPACE:25:18: in
/private/var/tmp/_bazel_vj/0fd29ddbf23dd925b13a927418bf78bf/external/tink_py/tink_py_deps_init.bzl:11:16: in tink_py_deps_init
/private/var/tmp/_bazel_vj/0fd29ddbf23dd925b13a927418bf78bf/external/rules_python/python/pip.bzl:128:15: in pip3_import
Repository rule pip_import defined at:
/private/var/tmp/_bazel_vj/0fd29ddbf23dd925b13a927418bf78bf/external/rules_python/python/pip.bzl:51:29: in
ERROR: An error occurred during the fetch of repository 'tink_py_pip_deps':
Traceback (most recent call last):
File "/private/var/tmp/_bazel_vj/0fd29ddbf23dd925b13a927418bf78bf/external/rules_python/python/pip.bzl", line 49, column 13, in _pip_import_impl
fail("pip_import failed: %s (%s)" % (result.stdout, result.stderr))
Error in fail: pip_import failed: (Traceback (most recent call last):
File "/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/private/var/tmp/_bazel_vj/0fd29ddbf23dd925b13a927418bf78bf/external/rulespython/tools/piptool.par/main.py", line 71, in
File "/var/folders/d /y_rh5fv977x6wjfjqtb80bb00000gn/T/tmplov9tb1a/pip-tmp/pip/init.py", line 43, in
from pip.utils import get_installed_distributions, getprog
File "/var/folders/d/y_rh5fv977x6wjfjqtb80bb00000gn/T/tmplov9tb1a/pip-tmp/pip/utils/init.py", line 27, in
from pip._vendor import pkg_resources
File "/private/var/tmp/_bazel_vj/0fd29ddbf23dd925b13a927418bf78bf/external/rules_python/tools/piptool.par/piptool_deps_pypipip_9_0_3/pip/_vendor/pkg_resources/init.py", line 74, in
File "/private/var/tmp/_bazel_vj/0fd29ddbf23dd925b13a927418bf78bf/external/rules_python/tools/piptool.par/piptool_deps_pypi pip_9_0_3/pip/_vendor/packaging/requirements.py", line 9, in
File "/private/var/tmp/_bazel_vj/0fd29ddbf23dd925b13a927418bf78bf/external/rules_python/tools/piptool.par/piptool_deps_pypipip_9_0_3/pip/vendor/pyparsing.py", line 943, in
AttributeError: module 'collections' has no attribute 'MutableMapping'
)
ERROR: /private/var/folders/d /y_rh5fv977x6wjfjqtb80bb00000gn/T/pip-install-nd0lwypp/tink_7fa5fd7a2b8b404db76dc61a7b6916a8/WORKSPACE:25:18: fetching pip_import rule //external:tink_py_pip_deps: Traceback (most recent call last):
File "/private/var/tmp/_bazel_vj/0fd29ddbf23dd925b13a927418bf78bf/external/rules_python/python/pip.bzl", line 49, column 13, in _pip_import_impl
fail("pip_import failed: %s (%s)" % (result.stdout, result.stderr))
Error in fail: pip_import failed: (Traceback (most recent call last):
File "/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/private/var/tmp/_bazel_vj/0fd29ddbf23dd925b13a927418bf78bf/external/rules_python/tools/piptool.par/main.py", line 71, in
File "/var/folders/d_/y_rh5fv977x6wjfjqtb80bb00000gn/T/tmplov9tb1a/pip-tmp/pip/ init.py", line 43, in
from pip.utils import get_installed_distributions, getprog
File "/var/folders/d/y_rh5fv977x6wjfjqtb80bb00000gn/T/tmplov9tb1a/pip-tmp/pip/utils/init.py", line 27, in
from pip._vendor import pkg_resources
File "/private/var/tmp/_bazel_vj/0fd29ddbf23dd925b13a927418bf78bf/external/rules_python/tools/piptool.par/piptool_deps_pypi pip_9_0_3/pip/_vendor/pkg_resources/init.py", line 74, in
File "/private/var/tmp/_bazel_vj/0fd29ddbf23dd925b13a927418bf78bf/external/rules_python/tools/piptool.par/piptool_deps_pypipip_9_0_3/pip/_vendor/packaging/requirements.py", line 9, in
File "/private/var/tmp/_bazel_vj/0fd29ddbf23dd925b13a927418bf78bf/external/rules_python/tools/piptool.par/piptool_deps_pypi__pip_9_0_3/pip/_vendor/pyparsing.py", line 943, in
AttributeError: module 'collections' has no attribute 'MutableMapping'
)
ERROR: no such package '@tink_py_pip_deps//': pip_import failed: (Traceback (most recent call last):
File "/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/private/var/tmp/_bazel_vj/0fd29ddbf23dd925b13a927418bf78bf/external/rules_python/tools/piptool.par/ main.py", line 71, in
File "/var/folders/d_/y_rh5fv977x6wjfjqtb80bb00000gn/T/tmplov9tb1a/pip-tmp/pip/ init.py", line 43, in
from pip.utils import get_installed_distributions, getprog
File "/var/folders/d/y_rh5fv977x6wjfjqtb80bb00000gn/T/tmplov9tb1a/pip-tmp/pip/utils/init.py", line 27, in
from pip._vendor import pkg_resources
File "/private/var/tmp/_bazel_vj/0fd29ddbf23dd925b13a927418bf78bf/external/rules_python/tools/piptool.par/piptool_deps_pypi pip_9_0_3/pip/_vendor/pkg_resources/init.py", line 74, in
File "/private/var/tmp/_bazel_vj/0fd29ddbf23dd925b13a927418bf78bf/external/rules_python/tools/piptool.par/piptool_deps_pypi__pip_9_0_3/pip/_vendor/packaging/requirements.py", line 9, in
File "/private/var/tmp/_bazel_vj/0fd29ddbf23dd925b13a927418bf78bf/external/rules_python/tools/piptool.par/piptool_deps_pypi__pip_9_0_3/pip/_vendor/pyparsing.py", line 943, in
AttributeError: module 'collections' has no attribute 'MutableMapping'
)
INFO: Elapsed time: 3.188s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)
error: command '/usr/local/bin/bazel' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure
× Encountered error while trying to install package. ╰─> tink
Provide your version information: