The end result is, i think, the same kind of Python version clashes that seem to frustrate installing manually (ie; not using install.py).
Initial version check:
erpnext@mine:~/frappe-bench$ cd /apps/frappe;
erpnext@mine:~/frappe-bench/apps/frappe$ git branch -a
* version-12
remotes/upstream/version-12
erpnext@mine:~/frappe-bench/apps/frappe$ cd ../erpnext
erpnext@mine:~/frappe-bench/apps/erpnext$ git branch -a
* version-12
remotes/upstream/version-12
erpnext@mine:~/frappe-bench/apps/erpnext$ git checkout master
error: pathspec 'master' did not match any file(s) known to git.
Killing the erpnext app and cloning the whole repo:
erpnext@mine:~/frappe-bench/apps/erpnext$ cd ..
erpnext@mine:~/frappe-bench/apps$ rm -fr erpnext/
erpnext@mine:~/frappe-bench/apps$ git clone git@github.com:it-iridium-blue/erpnext.git
Cloning into 'erpnext'...
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 313506 (delta 2), reused 0 (delta 0), pack-reused 313495
Receiving objects: 100% (313506/313506), 787.62 MiB | 5.47 MiB/s, done.
Resolving deltas: 100% (240392/240392), done.
Checking out files: 100% (5975/5975), done.
erpnext@mine:~/frappe-bench/apps$ cd erpnext/
erpnext@mine:~/frappe-bench/apps/erpnext$ git checkout master
Branch 'master' set up to track remote branch 'master' from 'origin'.
Switched to a new branch 'master'
erpnext@mine:~/frappe-bench/apps/erpnext$ cd ../..
erpnext@mine:~/frappe-bench$ bench version
erpnext 11.1.49
frappe 12.0.20
erpnext@mine:~/frappe-bench$ cd apps/erpnext/
~/frappe-bench/apps/erpnext ~/frappe-bench
erpnext@mine:~/frappe-bench/apps/erpnext$ git checkout develop
Switched to branch 'develop'
Your branch is up to date with 'origin/develop'.
erpnext@mine:~/frappe-bench/apps/erpnext$ cd ../..
~/frappe-bench
erpnext@mine:~/frappe-bench$ bench version
erpnext 12.x.x-develop
frappe 12.0.20
Now we can checkout, at least:
erpnext@mine:~/frappe-bench$ cd apps/erpnext/
~/frappe-bench/apps/erpnext ~/frappe-bench
erpnext@mine:~/frappe-bench/apps/erpnext$ git checkout version-12-hotfix
Branch 'version-12-hotfix' set up to track remote branch 'version-12-hotfix' from 'origin'.
Switched to a new branch 'version-12-hotfix'
erpnext@mine:~/frappe-bench/apps/erpnext$ cd ../..
~/frappe-bench
erpnext@mine:~/frappe-bench$ bench version
erpnext 12.2.2
frappe 12.0.20
But it still is not v12.2.3 … trying update:
erpnext@mine:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up to date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python3.6/site-packages (6.2.1)
Backing up sites...
INFO:bench.app:pulling frappe
INFO:bench.utils:git pull upstream version-12
From https://github.com/frappe/frappe
* branch version-12 -> FETCH_HEAD
Already up to date.
INFO:bench.utils:find . -name "*.pyc" -delete
INFO:bench.app:pulling erpnext
INFO:bench.utils:git pull origin version-12-hotfix
From github.com:it-iridium-blue/erpnext
* branch version-12-hotfix -> FETCH_HEAD
Already up to date.
BOOM
INFO:bench.utils:find . -name "*.pyc" -delete
Updating Python libraries...
INFO:bench.utils:./env/bin/pip install -q -U pip
INFO:bench.utils:/usr/local/bin/pip3 install --user -q -U -r /home/erpnext/.bench/requirements.txt
INFO:bench.app:installing frappe
INFO:bench.utils:./env/bin/pip install -q -U -e ./apps/frappe
INFO:bench.app:installing erpnext
INFO:bench.utils:./env/bin/pip install -q -U -e ./apps/erpnext
ERROR: Exception:
Traceback (most recent call last):
File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 441, in check_if_exists
self.satisfied_by = pkg_resources.get_distribution(str(no_marker))
File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 481, in get_distribution
dist = get_provider(dist)
File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 357, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pip._vendor.pkg_resources.ContextualVersionConflict: (python-dateutil 2.8.1 (/home/erpnext/frappe-bench/env/lib/python3.6/site-packages), Requirement.parse('python-dateutil<2.8.1,>=2.1; python_version >= "2.7"'), {'botocore'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 153, in _main
status = self.run(options, args)
: :
: :
File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pip._vendor.pkg_resources.ContextualVersionConflict: (python-dateutil 2.8.1 (/home/erpnext/frappe-bench/env/lib/python3.6/site-packages), Requirement.parse('python-dateutil<2.8.1,>=2.1; python_version >= "2.7"'), {'botocore'})
Traceback (most recent call last):
File "/usr/local/bin/bench", line 11, in <module>
load_entry_point('bench', 'console_scripts', 'bench')()
: :
: :
File "/home/erpnext/.bench/bench/commands/update.py", line 84, in _update
update_requirements(bench_path=bench_path)
File "/home/erpnext/.bench/bench/utils.py", line 442, in update_requirements
install_app(app, bench_path=bench_path)
File "/home/erpnext/.bench/bench/app.py", line 171, in install_app
exec_cmd("{pip} install {quiet} -U -e {app} {no_cache}".format(pip=pip_path, quiet=quiet_flag, app=app_path, no_cache=cache_flag))
File "/home/erpnext/.bench/bench/utils.py", line 161, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -U -e ./apps/erpnext
``
erpnext@mine:~/frappe-bench/apps/erpnext$ git checkout version-12-hotfix
Branch 'version-12-hotfix' set up to track remote branch 'version-12-hotfix' from 'origin'.
Switched to a new branch 'version-12-hotfix'
For the erpnext (and frappe) app repos, my understanding is the ''master" branch is version-12 rather than version-12-hotfix?
So version-12-hotfix receives say back port fixes that, once tested, are then merged into version-12 branch that runs in “production”?
So my mistake was switching to to the hotfix branch?
If I remember correctly I had the same Python bomb with version-12 as well.
I suspect I need further configuration adjustments before I can solve this, yet I don’t know what they are.
The thing that I don’t understand is:
erpnext@mine:~/frappe-bench/apps/erpnext$ git checkout version-12-hotfix
Branch 'version-12-hotfix' set up to track remote branch 'version-12-hotfix' from 'origin'.
Switched to a new branch 'version-12-hotfix'
erpnext@mine:~/frappe-bench/apps/erpnext$ cd ../..
~/frappe-bench
erpnext@mine:~/frappe-bench$ bench version
erpnext 12.2.2
frappe 12.0.20
Having just cloned the whole latest repo and switched to branch version-12, why has the bench version not changed (12.2.2 ==> 12.2.3)?
Does bench version take values come from ~/.bench, ~/frappe-bench or ~/frappe-bench/apps/erpnext?
When I switch to ~/.bench I find I have only part of the repo, as well…
erpnext@mine:~/.bench$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
erpnext@mine:~/.bench$ git checkout version-12
error: pathspec 'version-12' did not match any file(s) known to git.
erpnext@mine:~/.bench$
p.s.
if it wasn’t for that annoying modal alert I wouldn’t care about this trivial update. Is there a “do not notify” setting somewhere?
I do care about being sure the portal I am building can be updated, but I think you have solved that part, at least, @Akram_Mutaher. So … thank you for that!