-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
AttributeError: module 'site' has no attribute 'getsitepackages' when running p4a create #610
Comments
This might be because of the current slightly hacking hostpython3 usage (i..e. trying to run python3.5 from the system). Does your python3.5 installation let you run site.getsitepackages()? |
Nope. Attempting to run it in the terminal gives the same error:
|
Okay, interesting, this is not a scenario I had considered and I'm not sure what property of the installation causes this problem. Is it in a virtualenv? |
Yeah this is a virtualenv. I've installed Kivy, P4A, and its dependencies on it |
I think this is probably caused by this known issue in virtualenv (though I'm not certain). Possible workarounds for now include:
I appreciate that none of these are ideal, and I'll look at fixing this sooner rather than later (hopefully with an ideal method, using a locally built python), but that's probably the status for now. |
Hmmm. I haven't really had a very comfortable experience with building for android outside a virtualenv to be honest. What is the method used for? Is it just finding a list of the directories of installed packages? |
It's used here to get the site-packages dir so that we can add it to our modified PYTHONPATH when building modules for android. I appreciate that this isn't ideal, and intend to fix this by building a local hostpython3 as is done with python2. The current state is a convenient workaround to use the local system python instead. |
All right, I guess I'll wait for an actual fix. In the meantime, I've used a probably naive solution and changed |
That seems like an adequate solution for now. For the crashing on the phone, there's a bug right now that seems to cause compilation for the wrong architecture, but this doesn't affect everyone and I haven't pinned down the reason yet. It might also be something else. |
OK then, I'll use that until an official fix is released. The crashing issue seemed to have something to do with an empty _event.so file. I'll open a separate issue once I get some more information. |
@MelvIsntNormal Hi, I had exactly this error in django. I solved issue by opening manage.py and add this code to first line of it. |
@inclement should we use one of the workaround as a fallback method? |
Closing as stale, since it should be resolved by moving away from crystax and having a proper hostpython again for our own use. |
Hopefully this is just me doing something wrong.
I created a test project to test building an APK using Python 3.5. I'm running this comand:
which gives me the above error. Any way to get this working?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: