Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure on pip dependency #102

Closed
JoostvDoorn opened this issue May 28, 2018 · 14 comments
Closed

Failure on pip dependency #102

JoostvDoorn opened this issue May 28, 2018 · 14 comments

Comments

@JoostvDoorn
Copy link

I am getting an error when trying to build this project with: bazel build //....

https://github.com/JoostvDoorn/bazel-python-pip-error

I am not sure what to do with this error:

ERROR: /home/joost/.cache/bazel/_bazel_joost/7e57e77db4ea624dac6cd9819533e43f/external/pypi__requests_oauthlib_0_8_0/BUILD:15:1: Traceback (most recent call last):
	File "/home/joost/.cache/bazel/_bazel_joost/7e57e77db4ea624dac6cd9819533e43f/external/pypi__requests_oauthlib_0_8_0/BUILD", line 15
		py_library(name = "rsa", deps = [":pkg", requ...")])
	File "/home/joost/.cache/bazel/_bazel_joost/7e57e77db4ea624dac6cd9819533e43f/external/pypi__requests_oauthlib_0_8_0/BUILD", line 18, in py_library
		requirement("oauthlib[rsa]")
	File "/home/joost/.cache/bazel/_bazel_joost/7e57e77db4ea624dac6cd9819533e43f/external/my_deps/requirements.bzl", line 74, in requirement
		fail(("Could not find pip-provided de...))
Could not find pip-provided dependency: 'oauthlib[rsa]'
@w4-jungyeol
Copy link

Same to google-cloud-speech

Could not find pip-provided dependency: 'google-api-core[grpc]'

@tvi
Copy link

tvi commented Jun 29, 2018

I fixed the issue by adding oauthlib[rsa]==0.6.2 into my app's pip-requirements

@skyl
Copy link

skyl commented May 13, 2019

I get Could not find pip-provided dependency: 'oauthlib[signedtoken]' even if I try to put oauthlib[signedtoken]==3.0.1 into my requirements.txt.

@skyl
Copy link

skyl commented May 13, 2019

I fixed the issue by adding oauthlib[rsa]==0.6.2 into my app's pip-requirements

@tvi You mean the requirements.txt or somewhere else?

@tvi
Copy link

tvi commented May 13, 2019

Yes I mean requirements.txt

@skyl
Copy link

skyl commented May 13, 2019

Yes I mean requirements.txt

Okay, thank you. For me this does not solve the problem - I have all the things I could have AFAICT:

https://oauthlib.readthedocs.io/en/v3.0.1/faq.html#oauth-2-serviceapplicationclient-and-oauth-1-with-rsa-sha1-signatures-say-could-not-import-jwt-what-should-i-do

aiodns==2.0.0
aiohttp==3.5.4
appnope==0.1.0
asn1crypto==0.24.0
async-timeout==3.0.1
attrs==19.1.0
backcall==0.1.0
cachetools==3.1.0
certifi==2019.3.9
cffi==1.12.2
chardet==3.0.4
cryptography==2.6.1
decorator==4.4.0
defusedxml==0.5.0
Django==2.2.1
django-extensions==2.1.6
djangorestframework==3.9.2
google-api-core==1.9.0
google-api-python-client==1.7.8
google-auth==1.6.3
google-auth-httplib2==0.0.3
google-cloud-core==0.29.1
google-cloud-logging==1.10.0
google-cloud-pubsub==0.40.0
googleapis-common-protos==1.5.9
grpc-google-iam-v1==0.11.4
grpcio==1.20.1
httplib2==0.12.1
idna==2.8
ipython==7.4.0
ipython-genutils==0.2.0
jedi==0.13.3
jira==2.0.0
multidict==4.5.2
mysqlclient==1.4.2.post1
oauth2client==4.1.3
oauthlib==3.0.1
oauthlib[signedtoken]
parso==0.3.4
pbr==5.1.3
pexpect==4.6.0
pickleshare==0.7.5
prompt-toolkit==2.0.9
protobuf==3.7.1
ptyprocess==0.6.0
pyasn1==0.4.5
pyasn1-modules==0.2.4
pycares==3.0.0
pycparser==2.19
pydotplus==2.0.2
Pygments==2.3.1
PyJWT==1.7.1
pyparsing==2.3.1
python-ldap==3.2.0
pytz==2018.9
requests==2.21.0
requests-oauthlib==1.2.0
requests-toolbelt==0.9.1
rsa==4.0
six==1.12.0
slackclient==2.0.1
sqlparse==0.3.0
traitlets==4.3.2
uritemplate==3.0.0
urllib3==1.24.1
uuid==1.30
uWSGI==2.0.18
wcwidth==0.1.7
yarl==1.3.0

@skyl
Copy link

skyl commented May 13, 2019

Workaround for now in my cases is to manually specify requirements instead of using all_requirements. The problem seems to be something with the jira requirement which isn't absolutely needed in all cases:

/.../external/pypi__jira_2_0_0/BUILD:6:1: Traceback (most 
recent call last):
        File "/.../external/pypi__jira_2_0_0/BUILD", line 6
                py_library(name = "pkg", srcs = glob(["**/*.p..."]), <3 more arguments>)
        File "/.../external/pypi__jira_2_0_0/BUILD", line 13, in py_library
                requirement("oauthlib[signedtoken]")
        File "/.../external/py_web/requirements.bzl", line 570, in requirement
                fail(("Could not find pip-provided de...))
Could not find pip-provided dependency: 'oauthlib[signedtoken]'

@NaurisSadovskis
Copy link

Any updates on what could be causing this?

@mdvorsky
Copy link

The problem is here: https://github.com/bazelbuild/rules_python/blob/master/rules_python/whl.py#L110

This code needs to handle Provides-Extra as described here: https://www.python.org/dev/peps/pep-0566/#provides-extra-optional-multiple-use

@mdvorsky
Copy link

My attempt to fix this is here: #198

@JoostvDoorn
Copy link
Author

JoostvDoorn commented Jul 9, 2019

@skyl We also want to include jira into the requirements but we also run into the same issue. The other workarounds/fixes in this issue do not seem to work. Could you elaborate on your workaround?
Edit:
If you run into this issue with Jira then put git+https://github.com/pycontribs/jira.git@91c898018fce2102e3e400f25e9cb4b01e65927b in your requirements file instead of the pypi jira, since the latest version does not include oauthlib[signedtoken]

@alexeagle
Copy link
Collaborator

rules_python 0.1.0 has been released which upstreams the rules_python_external repo. Please switch from pip_import to pip_install which doesn't have this issue.

@xhuoroku
Copy link

xhuoroku commented Jul 7, 2021

as the pip_import(legacy) is the only packaging rule that supports Python 2, any plan to resolve this issue for pip_import?

@thundergolfer
Copy link

No there isn’t. Python 2 is not a supported version anymore, not even by Python itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants