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

Pure python requirements does not install (plyer for example) #795

Closed
Fak3 opened this issue Jun 17, 2016 · 6 comments
Closed

Pure python requirements does not install (plyer for example) #795

Fak3 opened this issue Jun 17, 2016 · 6 comments

Comments

@Fak3
Copy link
Contributor

Fak3 commented Jun 17, 2016

Hi. I Tried to create a dstro with plyer package included. Build process does not throw any error, distro reports that the plyer requirement is installed, but it is not. Debug logging reveal some issues with pure-python requirements.txt handling:

$ p4a create --dist_name=testpygame --bootstrap=pygame --requirements=pygame,python2,kivy,pil,plyer,requests --debug

...

[INFO]:    # Installing pure Python modules
[INFO]:    The requirements (plyer) don't have recipes, attempting to install them with pip
[INFO]:    If this fails, it may mean that the module has compiled components and needs a recipe.
[INFO]:    -> directory context /home/u1/.local/share/python-for-android/build
[DEBUG]:   -> running virtualenv-2.7 --python=python2.7 venv
[DEBUG]:        Running virtualenv with interpreter /usr/bin/python2.7
[DEBUG]:        New python executable in venv/bin/python2.7
[DEBUG]:        Not overwriting existing python script venv/bin/python (you must use venv/bin/python2.7)
[DEBUG]:        Installing setuptools, pip...done.
[INFO]:    Creating a requirements.txt file for the Python modules
[INFO]:    Installing Python modules with pip
[INFO]:    If this fails with a message about /bin/false, this probably means the package cannot be installed with pip as it needs a compilation recipe.
[DEBUG]:   -> running bash -c source venv/bin/activate && env CC=/bin/false CXX=/bin/false PYTHONPATH=/home/u1/.local/share/python-for-android/build/python-installs/testpygame/lib/python2.7/site-packages pip install --target '/home/u1/.local/share/python-for-android/build/python-installs/testpygame/lib/python2.7/site-packages' --no-deps -r requirements.txt
[DEBUG]:        You must give at least one requirement to install (see "pip help install")
[DEBUG]:   
@inclement
Copy link
Member

Hmm, looks like the requirements.txt is incorrectly empty (or maybe otherwise invalid). This vaguely rings a bell but I don't know why. Just to check, presumably you're using an up-to-date p4a?

@Fak3
Copy link
Contributor Author

Fak3 commented Jun 18, 2016

I installed it from github about a week ago

pip install git+https://github.com/kivy/python-for-android

On Sat, Jun 18, 2016 at 7:55 PM, Alexander Taylor notifications@github.com
wrote:

Hmm, looks like the requirements.txt is incorrectly empty (or maybe
otherwise invalid). This vaguely rings a bell but I don't know why. Just to
check, presumably you're using an up-to-date p4a?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#795 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AA8hmeU-ikPaPCZ5gRmdAZO9Q_TYw1jaks5qNCMGgaJpZM4I4VWs
.

@inclement
Copy link
Member

I just checked this, but couldn't reproduce it. You could try with the newest master version in case that fixes it, but other than that I'm not sure how to track it down.

@Fak3
Copy link
Contributor Author

Fak3 commented Jun 19, 2016

I just installed fresh version from master and this issue still exists. Complete log: https://gist.github.com/Fak3/e840bcd9bdec63f2d505f353b3c306f1

I created new dist testpygame_new, and the requirements.txt error still looks the same. And plyer is still nowhere to be found in the dist directory.

@Fak3
Copy link
Contributor Author

Fak3 commented Jun 19, 2016

Oh, I think i mixed my venv\system python2\3 - it may be the culprit. Checking it now

@Fak3
Copy link
Contributor Author

Fak3 commented Jun 19, 2016

Right. On my system pip points to pip3 by default. I think I initialized p4a using python2 from virtualenv (actually, buildozer did that for me). Then I got an error that p4a should not be launched inside virtualenv and installed system-wide p4a with pip3. Running that system-wide p4a results in this bug.
I was able to fix that by deleting p4a and installing it anew with pip2. I also deleted ~/.local/share/python-for-android/ - but not sure if that was necessary

@Fak3 Fak3 closed this as completed Jun 19, 2016
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