pkg.resources.distribution not found...

Wenn du dir nicht sicher bist, in welchem der anderen Foren du die Frage stellen sollst, dann bist du hier im Forum für allgemeine Fragen sicher richtig.
Antworten
DMD-OL
User
Beiträge: 327
Registriert: Samstag 26. Dezember 2015, 16:21

hi
ich möchte mir ne installationsdatei auf mein android tablet ziehen.
dazu verwende ich python-for-andriod mit kivy.
hab (soweit ich weiß) alles korrekt installiert und auch die pfadangaben korrekt gemacht.
über batch wollte ich jetzt den befehl:

Code: Alles auswählen

@echo off
REM Batch command to easily invoke the pip install/ uninstall function.
REM User can quickly install the required python module by just entering the module name
REM Runs on Windows 
:start
cls
echo.
echo.
echo ===================
echo ANDROID-INSTALL
echo      Menu
echo ===================

echo 1. Android Installationsdatei erstellen
echo 2. Beenden
echo ================
echo.
 
REM set the python version here
set python_ver=27

set /p x=Bitte Nummer eingeben:
IF '%x%' == '1' GOTO NUM_1
IF '%x%' == '2' GOTO NUM_2
GOTO start
 
:NUM_1

p4a apk --sdk_dir C:\Users\DMD-OL\AppData\Local\Android\Sdk --ndk_dir C:\Users\DMD-OL\Documents\Android\android-ndk-r12 --android_api 23 --ndk_version r12 --private C:\Users\DMD-OL\Desktop\ERGEBNISSE.py --package=org.example.myapp --name "My application" --version 0.1 --bootstrap=sdl2 --requirements=python2,kivy,numpy,dateutil,lepl.apps.rfc3696,reportlab

pause
GOTO start
:NUM_2
exit
ausführen lassen, nur leider bekomm ich diese fehlermeldung:

Code: Alles auswählen


===================
ANDROID-INSTALL
     Menu
===================
1. Android Installationsdatei erstellen
2. Beenden
================

Bitte Nummer eingeben:1
Traceback (most recent call last):
  File "C:\Python27\Scripts\p4a-script.py", line 5, in <module>
    from pkg_resources import load_entry_point
  File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 2927, in <module>
    @_call_aside
  File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 2913, in _call_aside
    f(*args, **kwargs)
  File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 2940, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 635, in _build_master
    ws.require(__requires__)
  File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 943, in require
    needed = self.resolve(parse_requirements(requirements))
  File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 829, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'sh>=1.10' distribution was not found and is required by python-for-android
Drücken Sie eine beliebige Taste . . .
leider kann damit aber nicht wirklich was anfangen.
könnte mir bitte jemand helfen?
ach und der code um den es hier geht is glaub ich dieser:

Code: Alles auswählen

#!C:\Python27\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'python-for-android==0.4','console_scripts','p4a'
__requires__ = 'python-for-android==0.4'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
    sys.exit(
        load_entry_point('python-for-android==0.4', 'console_scripts', 'p4a')()
BlackJack

Ist `pip` auf dem aktuellsten Stand?
DMD-OL
User
Beiträge: 327
Registriert: Samstag 26. Dezember 2015, 16:21

denke ich schon...

Code: Alles auswählen

Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. Alle Rechte vorbehalten.

C:\WINDOWS\system32>cd/

C:\>python -m pip install -U pip
Requirement already up-to-date: pip in c:\python27\lib\site-packages

C:\>pip list
buildozer (0.32)
docutils (0.12)
jinja2 (2.8)
Kivy (1.9.1)
Kivy-Garden (0.1.4)
kivy.deps.glew (0.1.4)
kivy.deps.gstreamer (0.1.5)
kivy.deps.sdl2 (0.1.12)
lepl (5.1.3)
MarkupSafe (0.23)
numpy (1.11.0)
p4a-build (1.0.2)
pbs (0.110)
pexpect (4.1.0)
Pillow (3.2.0)
pip (8.1.2)
ptyprocess (0.5.1)
Pygments (2.1.3)
pypiwin32 (219)
python-dateutil (2.5.3)
python-for-android (0.4)
reportlab (3.3.0)
requests (2.10.0)
setuptools (23.1.0)
six (1.10.0)
virtualenv (15.0.2)
wheel (0.29.0)

C:\>
ich verwende python 2.7.10, falls das hilf
DasIch
User
Beiträge: 2718
Registriert: Montag 19. Mai 2008, 04:21
Wohnort: Berlin

Der Befehl den du suchst ist pip list --outdated.
DMD-OL
User
Beiträge: 327
Registriert: Samstag 26. Dezember 2015, 16:21

Code: Alles auswählen

Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. Alle Rechte vorbehalten.

C:\WINDOWS\system32>cd/

C:\>pip list --outdated
numpy (1.11.0) - Latest: 1.11.1 [wheel]

C:\>
DMD-OL
User
Beiträge: 327
Registriert: Samstag 26. Dezember 2015, 16:21

is das so ok?
Antworten