Raspberry Pi – Software – Python package manager (PIP)
PIP is een package manager voor Python, je kan met PIP plugins en bibliotheken toevoegen aan je Python installatie op je Synology NAS.
Wat heb je nodig?
1) Python 2 sudo apt-get install python ,of python 3 sudo apt-get install python3
Installatie
Python PIP is eenvoudig te installeren met het commando:
Python 2: sudo apt-get install python-pip
Python 3: sudo apt-get install python3-pip
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: ffmpeg libmysqlclient18 libpq5 mysql-common Use 'apt-get autoremove' to remove them. The following extra packages will be installed: python-pkg-resources python-setuptools python2.6 python2.6-minimal Suggested packages: python-distribute python-distribute-doc python2.6-doc binfmt-support Recommended packages: python-dev-all The following NEW packages will be installed: python-pip python-pkg-resources python-setuptools python2.6 python2.6-minimal 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 4,475 kB of archives. After this operation, 14.5 MB of additional disk space will be used. Do you want to continue [Y/n]? Y Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main python2.6-minimal armhf 2.6.8-1.1 [1,409 kB] Get:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main python2.6 armhf 2.6.8-1.1 [2,442 kB] Get:3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main python-pkg-resources all 0.6.24-1 [63.6 kB] Get:4 http://mirrordirector.raspbian.org/raspbian/ wheezy/main python-setuptools all 0.6.24-1 [449 kB] Get:5 http://mirrordirector.raspbian.org/raspbian/ wheezy/main python-pip all 1.1-3 [112 kB] Fetched 4,475 kB in 1min 9s (64.0 kB/s) Selecting previously unselected package python2.6-minimal. (Reading database ... 73724 files and directories currently installed.) Unpacking python2.6-minimal (from .../python2.6-minimal_2.6.8-1.1_armhf.deb) ... Selecting previously unselected package python2.6. Unpacking python2.6 (from .../python2.6_2.6.8-1.1_armhf.deb) ... Selecting previously unselected package python-pkg-resources. Unpacking python-pkg-resources (from .../python-pkg-resources_0.6.24-1_all.deb) ... Selecting previously unselected package python-setuptools. Unpacking python-setuptools (from .../python-setuptools_0.6.24-1_all.deb) ... Selecting previously unselected package python-pip. Unpacking python-pip (from .../python-pip_1.1-3_all.deb) ... Processing triggers for man-db ... Processing triggers for desktop-file-utils ... Processing triggers for menu ... Setting up python2.6-minimal (2.6.8-1.1) ... Linking and byte-compiling packages for runtime python2.6... Setting up python2.6 (2.6.8-1.1) ... Setting up python-pkg-resources (0.6.24-1) ... Setting up python-setuptools (0.6.24-1) ... Setting up python-pip (1.1-3) ... Processing triggers for python-support ... Processing triggers for menu ... |
Als het goed is gegaan kun je nu PIP gebruiken met het commando: pip
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
Usage: pip COMMAND [OPTIONS] Options: --version show program's version number and exit -h, --help Show help -v, --verbose Give more output -q, --quiet Give less output --log=FILENAME Log file where a complete (maximum verbosity) record will be kept --proxy=PROXY Specify a proxy in the form user:passwd@proxy.server:port. Note that the user:password@ is optional and required only if you are behind an authenticated proxy. If you provide user@proxy.server:port then you will be prompted for a password. --timeout=SECONDS, --default-timeout=SECONDS Set the socket timeout (default 15 seconds) --exists-action=EXISTS_ACTION Default action when a path already exists.Use this option more then one time to specify another action if a certain option is not available, choices: (s)witch, (i)gnore, (w)ipe, (b)ackup Commands available: bundle: Create pybundles (archives containing multiple packages) freeze: Output all currently installed packages (exact versions) to stdout help: Show available commands install: Install packages search: Search PyPI uninstall: Uninstall packages unzip: Unzip individual packages zip: Zip individual packages |
– pip > installeert bibliotheken voor python 2.
– pip-3.3 > installeert bibliotheken voor python 3.
– sudo pip uninstall -y pyusb > verwijderdt de huidige versie.
–
sudo pip install pyusb==1.0.0b1 > installeert een andere (oudere versie).
bijvoorbeeld voor het oplossen van deze foutmelding:
NotImplementedError: is_kernel_driver_active