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

error: could not delete 'build/lib.linux-x86_64-2.7/buildozer/targets/android.py': Permission denied #607

Closed
ccharoux opened this issue Dec 23, 2017 · 9 comments

Comments

@ccharoux
Copy link

I am new on linux
could you tell me how to get the buildozer package updated in my virtual box linux machine
what command do i have to enter ?
note: no paswd for root in that machine

kivy@kivyvm:~/buildozer$ python setup.py build
/usr/local/lib/python2.7/dist-packages/setuptools/dist.py:334: UserWarning: Normalizing '0.35dev' to '0.35.dev0'
normalized_version,
running build
running build_py
copying buildozer/targets/android.py -> build/lib.linux-x86_64-2.7/buildozer/targets
error: could not delete 'build/lib.linux-x86_64-2.7/buildozer/targets/android.py': Permission denied
kivy@kivyvm:~/buildozer$

@RickardHultgren
Copy link

RickardHultgren commented Dec 24, 2017

Have you tried to install pip and then run:

pip install buildozer --upgrade

@ccharoux
Copy link
Author

ccharoux commented Dec 25, 2017

### if I run this, I receive permission denied !!
kivy@kivyvm:~/buildozer$ pip install buildozer --upgrade
Collecting buildozer
Requirement already up-to-date: virtualenv in /usr/local/lib/python2.7/dist-packages (from buildozer)
Collecting pexpect (from buildozer)
Using cached pexpect-4.3.1-py2.py3-none-any.whl
Collecting ptyprocess>=0.5 (from pexpect->buildozer)
Using cached ptyprocess-0.5.2-py2.py3-none-any.whl
Installing collected packages: ptyprocess, pexpect, buildozer
Found existing installation: ptyprocess 0.5.1
Uninstalling ptyprocess-0.5.1:
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/usr/local/lib/python2.7/dist-packages/pip/utils/init.py", line 267, in renames
shutil.move(old, new)
File "/usr/lib/python2.7/shutil.py", line 303, in move
os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/ptyprocess-0.5.1.dist-info/INSTALLER'
## And I dont know the root password (kivy virtualbox)

@kuzeyron
Copy link
Contributor

Can you tell us the steps, how and with what you created that VM?

@ccharoux
Copy link
Author

I have the kivy VM 2 on virtual box
I ran the commands to setup buildozer with 3.5 python
then I tried : buildozer android debug
the apk was nearly finished but I had the bug referenced #603
This bug has been declared fixed . And I am trying to get the fix for 15 days

@kuzeyron
Copy link
Contributor

kuzeyron commented Dec 26, 2017

You could try adding this line in /home/user/.bashrc
alias python=python3
And then with Terminal you simply do:
source /home/user/.bashrc

If that didn't work, you could try using this in your buildozer.spec:
p4a.branch = master

Edit: Kivy VM seems to have the password set to: kivy
Link: password for the ..

@ccharoux
Copy link
Author

I made what you said
here are buildozer.spec and .bashrc

files.zip

the bug is still there

kivy@kivyvm:~/buildozer$ buildozer android debug

Check configuration tokens

Ensure build layout

Check configuration tokens

Preparing build

Check requirements for android

Install platform

Apache ANT found at /home/kivy/.buildozer/android/platform/apache-ant-1.9.4

Android SDK found at /home/kivy/.buildozer/android/platform/android-sdk-20

Android NDK found at /home/kivy/.buildozer/android/platform/android-ndk-r9c

Check application requirements

Check garden requirements

Compile platform

Build the application #10

Package the application

Gradle project detected, copy files /home/kivy/buildozer/.buildozer/android/platform/build/dists/approche/src/main/java

Traceback (most recent call last):
File "/usr/local/bin/buildozer", line 11, in
load_entry_point('buildozer==0.35.dev0', 'console_scripts', 'buildozer')()
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.35.dev0-py2.7.egg/buildozer/scripts/client.py", line 13, in main
Buildozer().run_command(sys.argv[1:])
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.35.dev0-py2.7.egg/buildozer/init.py", line 1058, in run_command
self.target.run_commands(args)
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.35.dev0-py2.7.egg/buildozer/target.py", line 92, in run_commands
func(args)
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.35.dev0-py2.7.egg/buildozer/target.py", line 104, in cmd_debug
self.buildozer.build()
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.35.dev0-py2.7.egg/buildozer/init.py", line 212, in build
self.target.build_package()
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.35.dev0-py2.7.egg/buildozer/targets/android.py", line 817, in build_package
copyfile(join(apk_dir, apk), join(self.buildozer.bin_dir, apk_dest))
File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: u'/home/kivy/buildozer/.buildozer/android/platform/build/dists/approche/build/outputs/apk/approche-debug.apk'

@AbdeslamAabidi
Copy link

Check if exist these folders (marked with bold)

'.buildozer/android/platform/build/dists/approche/build/outputs/apk/'

if not create all missing folders.

Copy the generated apk

cp /home/kivy/.buildozer/android/platform/build/dists/approche/bin/Approche-0.1-debug.apk
.buildozer/android/platform/build/dists/approche/build/outputs/apk/Approche-debug.apk

and build again

buildozer -v android debug

@ccharoux
Copy link
Author

kivy@kivyvm:$ sudo apt-get update
Hit:1 http://fr.archive.ubuntu.com/ubuntu zesty InRelease
Get:2 http://fr.archive.ubuntu.com/ubuntu zesty-updates InRelease [89.2 kB]
Get:3 http://security.ubuntu.com/ubuntu zesty-security InRelease [89.2 kB]
Hit:4 http://ppa.launchpad.net/kivy-team/kivy/ubuntu zesty InRelease
Get:5 http://fr.archive.ubuntu.com/ubuntu zesty-backports InRelease [89.2 kB]
Get:6 http://security.ubuntu.com/ubuntu zesty-security/main amd64 DEP-11 Metadata [15.1 kB]
Get:7 http://security.ubuntu.com/ubuntu zesty-security/main DEP-11 64x64 Icons [17.6 kB]
Get:8 http://security.ubuntu.com/ubuntu zesty-security/universe amd64 DEP-11 Metadata [27.4 kB]
Get:9 http://security.ubuntu.com/ubuntu zesty-security/universe DEP-11 64x64 Icons [56.9 kB]
Get:10 http://security.ubuntu.com/ubuntu zesty-security/multiverse amd64 DEP-11 Metadata [208 B]
Get:11 http://fr.archive.ubuntu.com/ubuntu zesty-updates/main amd64 DEP-11 Metadata [55.1 kB]
Get:12 http://fr.archive.ubuntu.com/ubuntu zesty-updates/main DEP-11 64x64 Icons [32.3 kB]
Get:13 http://fr.archive.ubuntu.com/ubuntu zesty-updates/universe amd64 DEP-11 Metadata [203 kB]
Get:14 http://fr.archive.ubuntu.com/ubuntu zesty-updates/universe DEP-11 64x64 Icons [290 kB]
Get:15 http://fr.archive.ubuntu.com/ubuntu zesty-updates/multiverse amd64 DEP-11 Metadata [5,840 B]
Get:16 http://fr.archive.ubuntu.com/ubuntu zesty-backports/universe amd64 DEP-11 Metadata [4,712 B]
Fetched 976 kB in 2s (423 kB/s)
Reading package lists... Done
kivy@kivyvm:
$ $ sudo apt-get install python3-kivy
bash: $: command not found
kivy@kivyvm:$ sudo apt-get install python3-kivy
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-kivy is already the newest version (1.10.0-0
stable0+201708191146pkg175ubuntu17.04.1).
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

@ccharoux
Copy link
Author

I close because I am happy with pyton 2.7.
I will try to compile with 3.5 python library within next months
Thanks to have been with me for a while

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

4 participants