I am hosting my own ERPNext site on Centos 7.
I have successfully installed it for version-12 after several attempts, but all the instructions I have do not talk about versions 13 or 14.
So I did a snapshot of my working version 12 and am attempting a fresh install of version-16. It seems that version 14 requires python 3 and nodejs 16 whic I am installing. However I cannot get past the
“bench init --frappe-branch version-14 frappe-bench”
I get the following error:
[frappe@powergps ~]$ bench init --frappe-branch version-14 frappe-bench
Setting Up Environment
$ /usr/bin/python3.6 -m venv env
$ /home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade pip
Cache entry deserialization failed, entry ignored
Getting frappe
$ git clone https://github.com/frappe/frappe.git --branch version-14 --origin upstream
Cloning into 'frappe'...
remote: Enumerating objects: 383648, done.
remote: Counting objects: 100% (190/190), done.
remote: Compressing objects: 100% (115/115), done.
remote: Total 383648 (delta 104), reused 135 (delta 75), pack-reused 383458
Receiving objects: 100% (383648/383648), 329.50 MiB | 64.98 MiB/s, done.
Resolving deltas: 100% (295263/295263), done.
Installing frappe
$ /home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/frappe/frappe-bench/apps/frappe
ERROR: Command errored out with exit status 1:
command: /home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/env/lib64/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_editable /tmp/tmp83a6w2gl
cwd: /home/frappe/frappe-bench/apps/frappe
Complete output (17 lines):
Traceback (most recent call last):
File "/home/frappe/frappe-bench/env/lib64/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/home/frappe/frappe-bench/env/lib64/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/frappe/frappe-bench/env/lib64/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 144, in get_requires_for_build_editable
return hook(config_settings)
File "/tmp/pip-build-env-la3wqaay/overlay/lib/python3.6/site-packages/flit_core/buildapi.py", line 32, in get_requires_for_build_wheel
docstring, version = get_docstring_and_version_via_ast(module)
File "/tmp/pip-build-env-la3wqaay/overlay/lib/python3.6/site-packages/flit_core/common.py", line 132, in get_docstring_and_version_via_ast
node = ast.parse(f.read())
File "/usr/lib64/python3.6/ast.py", line 35, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 1081
if key := can_cache_doc(args):
^
SyntaxError: invalid syntax
----------------------------------------
WARNING: Discarding file:///home/frappe/frappe-bench/apps/frappe. Command errored out with exit status 1: /home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/env/lib64/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_editable /tmp/tmp83a6w2gl Check the logs for full command output.
ERROR: Command errored out with exit status 1: /home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/env/lib64/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_editable /tmp/tmp83a6w2gl Check the logs for full command output.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/bench/commands/make.py", line 83, in init
verbose=verbose,
File "/usr/local/lib/python3.6/site-packages/bench/utils/render.py", line 95, in wrapper_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/bench/utils/system.py", line 85, in init
resolve_deps=False,
File "/usr/local/lib/python3.6/site-packages/bench/app.py", line 433, in get_app
app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
File "/usr/local/lib/python3.6/site-packages/bench/utils/render.py", line 110, in wrapper_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/bench/app.py", line 239, in install
resolution=self.local_resolution
File "/usr/local/lib/python3.6/site-packages/bench/app.py", line 553, in install_app
bench.run(f"{bench.python} -m pip install {quiet_flag} --upgrade -e {app_path} {cache_flag}")
File "/usr/local/lib/python3.6/site-packages/bench/bench.py", line 47, in run
return exec_cmd(cmd, cwd=cwd or self.cwd)
File "/usr/local/lib/python3.6/site-packages/bench/utils/__init__.py", line 153, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError
ERROR: There was a problem while creating frappe-bench
Do you want to rollback these changes? [y/N]: y
I have also tried setting python 3 as the default with this:
# Start by registering python2 as an alternative
alternatives --install /usr/bin/python python /usr/bin/python2 50
# Register python3.5 as an alternative
alternatives --install /usr/bin/python python /usr/bin/python3.5 60
# Select which Python version to use
alternatives --config python
Also, below are my steps from a fresh centos image:
sudo yum update -y &&
sudo yum upgrade -y
sudo adduser frappe &&
sudo usermod -aG wheel frappe &&
passwd frappe
su frappe
cd /home/frappe/frappe-bench
sudo yum install -y redhat-lsb-core git python3-setuptools python3-devel python3.10-devel python3-pip openssl-devel libffi-devel python3-distutils
sudo yum install -y python3.10-venv
sudo yum groupinstall -y “Development tools” &&
sudo yum install -y redhat-lsb-core git python3-setuptools python3-devel openssl-devel libffi-devel
sudo yum install epel-release
sudo yum -y install mariadb mariadb-server mysql-devel
sudo nano /etc/my.cnf
Add the following lines under the symbolic-links=0 line.
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
sudo pip3 install --upgrade pip setuptools &&
sudo pip3 install ansible
sudo systemctl start mariadb.service &&
sudo systemctl enable mariadb.service &&
sudo mysql_secure_installation &&
sudo systemctl start mariadb.service &&
sudo systemctl enable mariadb.service &&
sudo service mariadb.service restart
sudo sh -c “firewall-cmd --permanent --zone=public --add-service=http && firewall-cmd --permanent --zone=public --add-service=https && firewall-cmd --reload” &&
sudo firewall-cmd --permanent --add-port=8000/tcp &&
sudo firewall-cmd --permanent --add-port=9000/tcp
firewall-cmd --reload **RUN IN ROOT
sudo curl --silent --location https://rpm.nodesource.com/setup_16.x | sudo bash -
sudo yum -y install nginx nodejs redis
sudo systemctl start nginx &&
sudo systemctl enable nginx &&
sudo systemctl start redis &&
sudo systemctl enable redis
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo &&
sudo rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg &&
sudo yum install yarn
sudo yum -y install libXrender libXext xorg-x11-fonts-75dpi xorg-x11-fonts-Type1 &&
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz &&
sudo tar -xf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz -C /opt &&
sudo ln -s /opt/wkhtmltox/bin/wkhtmltopdf /usr/bin/wkhtmltopdf &&
sudo ln -s /opt/wkhtmltox/bin/wkhtmltoimage /usr/bin/wkhtmltoimage
sudo pip3 install frappe-bench
bench init --frappe-branch version-14 frappe-bench
Not sure what the next step is.