1er commit

De la docs au format Mkdocs
This commit is contained in:
2018-09-16 14:48:15 +02:00
commit e82296ba06
140 changed files with 17082 additions and 0 deletions

64
docs/Synology/python.md Normal file
View File

@@ -0,0 +1,64 @@
# Installer pip et python 3
DSM 6 fournit Python 2 (2.7.12) dans `/bin/python`
### Installer Python 3:
Il faut installer **python 3** et **pip** depuis <u>iPKGui</u>, soit les paquets:
- python3
- py3-pip
- py3-setuptools
L'installation se fait dans `/opt/bin/`
```bash
$ which python3
/opt/bin/python3
$ which pip3
/opt/bin/pip3
```
Les modules sont ici:
`/volume1/@optware/local/lib/python3.5/site-packages` (pip, setuptools)
### Installer un module (mkdocs):
!!! Pour des problèmes de droit, l'installation se fait avec —user
PermissionError: [Errno 13] Permission denied: '/opt/local/lib/python3.5/site-packages/click-6.7.dist-info'
```bash
$ pip3 install --user mkdocs
$ pip3 install --user klaus
```
Les modules sont installés ici:
`/volume1/homes/bruno/.local/lib/python3.5/site-packages`
L'applicatif est installé ici:
`/volume1/homes/bruno/.local/bin/klaus`
~/.local/lib/python3.5/site-packages/klaus/wsgi.py
### Mettre à jour un module:
```bash
$ pip3 install --user --upgrade setuptools
```