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

pyinstaller cannot import aiohttp #2301

Closed
karamjaber opened this issue Oct 4, 2017 · 3 comments
Closed

pyinstaller cannot import aiohttp #2301

karamjaber opened this issue Oct 4, 2017 · 3 comments
Labels
invalid This doesn't seem right outdated

Comments

@karamjaber
Copy link

karamjaber commented Oct 4, 2017

Long story short

I wrote some big software in Python and now i want to build a one executable file that will run it all.
To build this executable i used pyinstaller .
It worked fine until i used aiohttp module, for some reason it doesn't recognize it

Expected behaviour

To build the aiohttp as part of the executable

Actual behaviour

After creating the executable and trying to run it i get the message
"ImportError: No module named 'aiohttp'"

Steps to reproduce

A file that contains

import aiohttp
print("hello word")

Then try to make an executable file from this python file

Your environment

Python 3
Any windows

@karamjaber karamjaber changed the title cxfreeze/pyinstaller aiohttp cannot import compat pyinstaller cannot import aiohttp Oct 4, 2017
@asvetlov
Copy link
Member

asvetlov commented Oct 4, 2017

Sorry, but executable building is out of aiohttp scope.
The project has nothing special from this perspective.
IIRC you need enumerate missed top level packages in your setup.py. cf_Freeze supports build_exe_options for example.

@asvetlov asvetlov added the invalid This doesn't seem right label Oct 5, 2017
@rckclmbr
Copy link

rckclmbr commented Oct 7, 2017

@karamjaber you could also add aiohttp to hiddenimports in your spec file. ie

hiddenimports=['aiohttp'],

@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid This doesn't seem right outdated
Projects
None yet
Development

No branches or pull requests

3 participants