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

“No module named setuptools” after installing setuptools #444

Closed
minglethepringle opened this issue Jan 1, 2017 · 1 comment
Closed

Comments

@minglethepringle
Copy link

I have a Flask server in a Python file. It's really simple:

from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello():
    return "Hello World!"

if __name__ == '__main__':
    app.run() 

I'm using Kivy's Buildozer to build my file. After creating buildozer.spec and specifying requirements = kivy,flask I try to build with buildozer -v android debug which should build the APK.

Instead, it crashes in the middle of building and gives me this error:

File "setup.py", line 4, in

from setuptools import setup

ImportError: No module named setuptools

This setup.py is Buildozer's, not mine.

I uninstalled setuptools completely with sudo apt-get purge python-setuptools, sudo -H pip uninstall setuptools, and I removed the easy_install command from /usr/local/bin (both easy_install and easy_install-2.7). I run sudo easy_install and it says it's not there. Good.

Then I follow instructions from here, and I run wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python. It installs successfully, and I test that easy_install is there by doing sudo easy_install and checking at /usr/local/bin. I also go into the Python shell and type from setuptools import setup and it works. So, setuptools is installed. However, buildozer -v android debug still fails with the same error.

Could someone figure out what's happening? Setuptools is installed; why is Buildozer not finding it?

This is my log, with log_level = 2 in buildozer.spec: Link

@inclement
Copy link
Member

You must use buildozer android_new debug to use flask. This uses the new python-for-android toolchain, the old toolchain is no longer supported.

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

No branches or pull requests

2 participants