-
Notifications
You must be signed in to change notification settings - Fork 48
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
Import error despite having satisfactory version of requests #59
Comments
Pip has a bug with extras which is likely affecting you here: pypa/pip#4957 |
Thanks for the heads up! I think this is a separate issue though since I can verify through Since google-resumable-media only requires >= 2.18.0 this seems like a bug. Just for completeness I separated my |
I cannot reproduce in a fresh virtual environment: $ python3.6 -m venv /tmp/grmp/59
$ /tmp/grmp/59/bin/pip install --upgrade setuptools pip
...
Successfully installed pip-18.1 setuptools-40.6.3
$ /tmp/grmp/59/bin/pip install google-resumable-media[requests]
...
Successfully installed certifi-2018.11.29 chardet-3.0.4 google-resumable-media-0.3.2 idna-2.8 requests-2.21.0 six-1.12.0 urllib3-1.24.1
$ /tmp/grmp/59/bin/pip freeze
-f file:///XXX/.pip/wheels
certifi==2018.11.29
chardet==3.0.4
google-resumable-media==0.3.2
idna==2.8
requests==2.21.0
six==1.12.0
urllib3==1.24.1
$ /tmp/grmp/59/bin/python -c "from google import resumable_media; print(resumable_media.__path__)"
['/tmp/grmp/59/lib/python3.6/site-packages/google/resumable_media'] |
Ahh shoot my bad this looks to be a pyinstaller specific issue as requests wasn't being included in the resulting binary. Issues are resolved now! For others that might stumble across this issue, adding a hook called
@tseaver thanks for looking into this! |
Add requests package hidden import in order to bypass the importing issue described in: googleapis/google-resumable-media-python#59
Add pyinstaller hook in order to bypass the importing issue described in: googleapis/google-resumable-media-python#59
I'm facing the same problem and i also tried to add the hook in the hooks folder as said by you and also copied your code. if u found the solution please help me ! its still giving me the same error please help me |
I am facing the same issue when I am running the exe, Please help me on how to avoid this issue, this is my code
|
Same problem here, I already included the hook as said and it didn't solve the problem. |
This is how i fixed the error : Made a hook(python file) named it
and the content of it is as follow :
Then after just past this file to the hooks folder inside pyinstaller where all the other hooks are. Hope it fixed the error for you. |
Thank you very much @Kryptonh4x0r for trying to help, the file name I was using indeed was wrong, but nevertheless the problem stills. Notice that in my log the hook is processed but I am still receiving the error when run the exe. (cap) D:\dev\code\deepstockwebcapture>pyinstaller --distpath D:\dev\install capture.spec --workpath D:\dev\install\build Running exe: [17132] LOADER: Running capture.py |
Add requests package hidden import in order to bypass the importing issue described in: googleapis/google-resumable-media-python#59
Add pyinstaller hook in order to bypass the importing issue described in: googleapis/google-resumable-media-python#59
Using a virtualenv for installing dependencies through pip. I notice that pip installs the following versions of requests and google-resumable-media:
requests-2.21.0
google-resumable-media-0.3.2
But I'm still met with the following import error:
Even after adding
google-resumable-media[requests]
to the set of pip dependencies being installed, the same message appears.The text was updated successfully, but these errors were encountered: