How to upgrade to V13

Hey developers, I’m using V12 and it got alot of customization on each department, and I want to upgrade to V13 without loosing anything.

This works for me:
During installation answer all yes. Copy SSL certificates paths , are deleted during installation.

Initial versions
ERPNext: v12.19.0 (version-12)
Frappe Framework: v12.16.3 (version-12)
bench/frappe: 5.0.0
node: v8.17.0
yarn: v1.16.0
npm: 6.13.4
python: 3.6.9
Upgrade the system
sudo apt update
sudo apt upgrade
Update node-npm-yarn
curl -fsSL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install -g npm
sudo npm install -g yarn
Upgrade frappe-bench
sudo -H pip3 install --upgrade frappe-bench
Installation directory
cd -your-directory-
Update
bench setup requirements
bench update
Error (later resolved)
error: <class 'socket.error'>, [Errno 13] Permission denied: file: /usr/lib/python2.7/socket.py line: 228
New version
bench switch-to-branch version-13 frappe erpnext --upgrade
sudo service nginx restart
sudo supervisorctl reload
bench update --patch
Fix previous error
sudo systemctl start supervisor
sudo systemctl enable supervisor
sudo bench setup production -your-user-
Update
bench update
bench build
Change port (if necessary)
bench set-nginx-port site1.local 8080
bench setup nginx
sudo service nginx reload

Add the SSL certificates (if necessary)

Final versions
ERPNext: v13.0.1 (version-13)
Frappe Framework: v13.0.2 (version-13)
bench/frappe: 5.3.0
node: v10.24.1
yarn: v1.22.10
npm: 7.8.0
python: 3.6.9

9 Likes

I’ll update it right now, thanks

work for me. Thank you

I get this error after command: bench switch-to-branch version-13 frappe erpnext --upgrade

What do I do?
Appreciate your kind help.

Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.5/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/home/user/frappe-bench/apps/frappe/frappe/__init__.py", line 143
    db: typing.Union[MariaDBDatabase, PostgresDatabase]
      ^
SyntaxError: invalid syntax

Upgrading from
ERPNext: v12.9.4 (version-12)
Frappe Framework: v12.6.1 (version-12)
node: v8.17.0
yarn: v1.22.0
nom: v6.13.4
python: 2.7.13
Debian: v9.12

Thank you for sharing, this worked for me. But is there anything besides these steps I should take care of. LIke any database keys, name, password, or site-local config, or anything else, that will help me run ERPNext smoothly.

1 Like

How did you solve the “Permission denied: file: /usr/lib/python2.7/socket.py line: 228”?

i have the same error. did you find solution for this?

I am experiencing the same thing, I have opened a GitHub issues here;

Follow this 32. How to upgrade Frappe and ERPNext to latest version - YouTube

video for @Emmanuel_Anthony

If anyone is facing error at this, you’re most likely using Python 2. Version-13 only supports python3.6+. Python2 is EOL and most software have stopped supporting it. Sunsetting Python 2 | Python.org

Ideally you should use python 3.7 or 3.8 so you don’t have to deal with update again in near future.

Where should all commands be executed? My frappe-bench folder is called erpnext. If I run the command pip3 install --upgrade erpnext, this error occurs:

[bench@node4037 ~]$ pip3 install --upgrade erpnext
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement erpnext (from versions: none)
ERROR: No matching distribution found for erpnext
[bench@node4037 ~]$

Regards
Jaime

sudo -H pip3 install --upgrade frappe-bench
did not work
sudo -H pip3 install --upgrade pip
worked for me

Hi,
I am facing below issue
attributeerror: ‘user’ object has no attribute ‘module profile’ at the time of migrate

due to this issue showing system is updating

can anyone help

For all the permission denied and not writeable errors, try the following command

sudo chown -R <erpuser>:<erpuser> <path to bench>

Worked like a charm for me :slight_smile:

Was it Local version or Live version?

Thanks, I’ve followed these instructions quite successfully until this point:

**~/frappe-bench**$ bench switch-to-branch version-13 frappe erpnext --upgrade
...
Installing 2 applications...

Installing frappe

$ /home/erpnext/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/erpnext/frappe-bench/apps/frappe

ERROR: Could not find a version that satisfies the requirement chardet~=5.1.0 (from frappe) (from versions: 1.0, 1.0.1, 1.1, 2.1.1, 2.2.1, 2.3.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 4.0.0, 5.0.0)

ERROR: No matching distribution found for chardet~=5.1.0

ERROR:

Looks like the chardet library is not compatible with the python version (3.6.9) on my system. Any ideas how to get past this?