Do help me out raising issues, they’re most likely string to bytes, unicode, etc. etc. syntax. Will dispatch fixes immediately!
Will do …migrating now …
Thanks
Are we not kill UBUNTU 14.04-32bit if we care to install Python 3.6?
"Python 3 is already installed on all currently supported Ubuntu releases. On Ubuntu 14.04, you have Python 3.4. You should normally avoid installing your own Python versions, because the system heavily depends on those which are preinstalled. "
It is not the time to upgrade VM virtual image to UBUNTU 16.04 64bit from UBUNTU 14.04 32bit?
Github issue:
Hi,
I’m new to EXPNext but I do know python and I would like to help out by testing new installs on Debian. Here are the steps that I used
apt update
apt upgrade
locale-gen en_US.UTF-8
apt install -y python3 python3-pip
echo "frappe ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
python3 install.py --production --user frappe --mysql-root-password ***** --admin-password ****
Please let me know if this is the ideal way to do a fresh install
TIA!
GitHub - pyenv/pyenv: Simple Python version management could be used to have our own python version if needed
I tried it with PyPy.
It worked seamlessly (almost). I could see some performance improvements too!
Known issues:
- PyPDF2 merging (using PdfFileWriter class) doesn’t work.
Can you write it up? Maybe a page on the wiki?
And what was the use case for PyPy or was this just an experiment?
Its simple really.
# Add PyPy repository
sudo add-apt-repository ppa:pypy/ppa
sudo apt-get update
# Install relevant packages
sudo apt-get install pypy pypy-dev
# Install dependencies
sudo apt-get install libxml2-dev libxslt1-dev
sudo pip install lxml
# Migrate environment! (execute from your bench instance)
bench migrate-env pypy
This was an experiment, primarily to check out the perfromance of PyPy compared to Python. It advertises 7.6 times faster performance.
I did not test benchmarks, but there was some visible improvement in comparison to Python.
However, it is not as stable as Python. If your instance requires PyPDF2’s merging features, you must use Python. Another alternative might be to make use of both implementations to get a proper balance of performance and stability.
Hello;
I succeeded with bench migrate-env python3
but I am facing problem when I run bench update --reset
as I am getting this error:
TypeError: the JSON object must be str, not ‘bytes’
I faced the problem of Command "python setup.py egg_info" failed with error code 1
but the solution was by modifying the setup.py file at the repository of the custom application.
(Reference: [Solved]Command "python setup.py egg_info" failed with error code 1).
And below is the details
Updating Python libraries…
INFO:bench.utils:./env/bin/pip install --upgrade pip
Requirement already up-to-date: pip in ./env/lib/python3.5/site-packages (19.0.1)
INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/.bench/requirements.txt
INFO:bench.app:installing frappe
INFO:bench.utils:./env/bin/pip install -q -e ./apps/frappe
INFO:bench.app:installing erpnext
INFO:bench.utils:./env/bin/pip install -q -e ./apps/erpnext
INFO:bench.app:installing taxi
INFO:bench.utils:./env/bin/pip install -q -e ./apps/taxi
INFO:bench.app:installing travel_agency
INFO:bench.utils:./env/bin/pip install -q -e ./apps/travel_agency
INFO:bench.app:installing notary
INFO:bench.utils:./env/bin/pip install -q -e ./apps/notary
Updating node packages…
INFO:bench.utils:yarn install
yarn install v1.13.0
[1/4] Resolving packages…
success Already up-to-date.
Done in 0.75s.
Backing up sites…
Patching sites…
Migrating site1.local
Updating DocTypes for frappe : [========================================]
Updating DocTypes for erpnext : [========================================]
Updating DocTypes for taxi : [========================================]
Updating DocTypes for travel_agency : [========================================]
Updating DocTypes for notary : [========================================]
Traceback (most recent call last):
File “/usr/lib/python3.5/runpy.py”, line 184, in _run_module_as_main
“main”, mod_spec)
File “/usr/lib/python3.5/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 227, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 53, in migrate
router.sync_global_search()
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 355, in sync_global_search
sync_global_search()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/global_search.py”, line 314, in sync_global_search
value = json.loads(frappe.cache().lpop(‘global_search_queue’))
File “/usr/lib/python3.5/json/init.py”, line 312, in loads
s.class.name))
TypeError: the JSON object must be str, not ‘bytes’
frappe@Bilal:~/frappe-bench$
ERPNext and Frappe is version 11.1.3 master
Regards
Bilal
This should be fixed with fix(sync_global_search): decode json object as str by Thunderbottom · Pull Request #6867 · frappe/frappe · GitHub
@achillesrasquinha, is ERPNext with python 3 really not production ready or is it just the python 2 to python 3 migration which is not ready ?
I’m asking because I plan to setup a new “production” ERPNext instance and I would prefer to go directly to python 3 instead of going through the hassle of later migrating…
We’ve been using python3.7 with ERPNext for 4 months now on our production with thousands of transactions per day. Runs as smooth as butter.
Successfully migrated to Python 3 with no issues using these three lines:
sudo apt-get install python3-dev
bench migrate-env python3
bench update
Thanks for your suggestion, it works on production VM.
Now it works with python3
Installed Apps
ERPNext: v11.1.39 (master)
Frappe Framework: v11.1.36 (master)
I got updating …msg when i accessed the site. So for me below steps worked
sudo apt-get install python3-dev
bench migrate-env python3
bench restart
bench update
May be it is for development not for production (master). Is the reason you restart bench?