Installation nouvelle méthode

Bonjour,
Après la commande : python3 -m pip install dokos-cli
bench ne s’installe pas !
Merci.
L’ancienne installation est elle toujours valable ?

Bonjour Christian,

Comme indiqué dans la documentation, il faut se reconnecter ou bien ajouter le dossier ~/.local/bin au PATH avec la commande export PATH=$PATH:$HOME/.local/bin pour que l’installation de bench soit bien prise en compte juste après l’installation.

Corentin

Toujours pas !!

test@test:~$ python3 -m pip install dokos-cli
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: dokos-cli in ./.local/lib/python3.10/site-packages (2.5.3)
Requirement already satisfied: gitpython~=2.1.15 in ./.local/lib/python3.10/site-packages (from dokos-cli) (2.1.15)
Requirement already satisfied: setuptools>40.9.0 in /usr/lib/python3/dist-packages (from dokos-cli) (59.6.0)
Requirement already satisfied: python-crontab~=2.6.0 in ./.local/lib/python3.10/site-packages (from dokos-cli) (2.6.0)
Requirement already satisfied: honcho in ./.local/lib/python3.10/site-packages (from dokos-cli) (1.1.0)
Requirement already satisfied: click>=7.0 in /usr/lib/python3/dist-packages (from dokos-cli) (8.0.3)
Requirement already satisfied: python-gitlab==1.13.0 in ./.local/lib/python3.10/site-packages (from dokos-cli) (1.13.0)
Requirement already satisfied: semantic-version~=2.8.2 in ./.local/lib/python3.10/site-packages (from dokos-cli) (2.8.5)
Requirement already satisfied: tomli in ./.local/lib/python3.10/site-packages (from dokos-cli) (2.0.1)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from dokos-cli) (2.25.1)
Requirement already satisfied: jinja2~=3.0.3 in /usr/lib/python3/dist-packages (from dokos-cli) (3.0.3)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from python-gitlab==1.13.0->dokos-cli) (1.16.0)
Requirement already satisfied: gitdb2<3,>=2 in ./.local/lib/python3.10/site-packages (from gitpython~=2.1.15->dokos-cli) (2.0.6)
Requirement already satisfied: python-dateutil in ./.local/lib/python3.10/site-packages (from python-crontab~=2.6.0->dokos-cli) (2.8.2)
Requirement already satisfied: smmap2>=2.0.0 in ./.local/lib/python3.10/site-packages (from gitdb2<3,>=2->gitpython~=2.1.15->dokos-cli) (3.0.1)
Requirement already satisfied: smmap>=3.0.1 in ./.local/lib/python3.10/site-packages (from smmap2>=2.0.0->gitdb2<3,>=2->gitpython~=2.1.15->dokos-cli) (5.0.0)

Merci !

Effectivement “modifications de votre variable d’environnement PATH” mais c’est après l’installation de Dokos-cli. Ne faut-il pas rajouter sudo à la commande ?
Merci.

Vous avez bien installé dokos-cli !

Requirement already satisfied: dokos-cli in ./.local/lib/python3.10/site-packages

Donc normalement la commande est accessible avec bench, ou au moins ~/.local/bin/bench.
Et pas besoin de sudo pour le pip install

Bonjour, Merci pour votre aide.
Je progresse, mais j’ai encore une erreur !

test@dokos:~/dokos-bench$ bench --site test.local install-app dokos
Could not find app “payments”:
No module named ‘payments’
An error occurred while installing dokos: No module named ‘payments’
Traceback (most recent call last):
File “apps/frappe/frappe/utils/caching.py”, line 55, in wrapper
return frappe.local.request_cache[func][args_key]
KeyError: -8943953842984811467

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “apps/frappe/frappe/commands/site.py”, line 471, in install_app
_install_app(app, verbose=context.verbose, force=force)
File “apps/frappe/frappe/installer.py”, line 265, in install_app
install_app(required_app, verbose=verbose)
File “apps/frappe/frappe/installer.py”, line 258, in install_app
app_hooks = frappe.get_hooks(app_name=name)
File “apps/frappe/frappe/init.py”, line 1468, in get_hooks
hooks = _dict(_load_app_hooks(app_name))
File “apps/frappe/frappe/utils/caching.py”, line 57, in wrapper
return_val = func(*args, **kwargs)
File “apps/frappe/frappe/init.py”, line 1440, in _load_app_hooks
app_hooks = get_module(f"{app}.hooks")
File “apps/frappe/frappe/init.py”, line 1295, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python3.10/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 992, in _find_and_load_unlocked
File “”, line 241, in _call_with_frames_removed
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘payments’

Merci !

Bonjour Christian,

Ah je crois qu’il manque une information dans la documentation d’installation : le flag --resolve-deps

De plus, je suppose que le bench est sur la version develop de Dodock par défaut, ce qui peut poser des soucis (je vais corriger la documentation sur ce point), j’ai inclus ci-dessous une commande pour corriger ça.

Voilà les commandes pour installer Dokos avec ses dépendances (payments) :

rm -rf apps/erpnext apps/payments

bench switch-to-branch v3.x.x && bench update --reset

bench get-app --branch v3.x.x payments
bench get-app --branch v3.x.x dokos
bench --site test.local install-app dokos

Je note que c’est moi qui ait réécrit la documentation d’installation manuelle il y a quelques semaines, et j’ai oublié quelques points apparemment.