Update Bokeh Version on Pythonanywhere hosted webapplication - bokeh

I'm struggling to update the Bokeh version on my pythonanywhere hosted webapplication.
I'm wanting to install Bokeh 2.4.3, however the pythonanywhere server only has Bokeh 1.3.4 installed.
I've tried updating through the bashconsole
10:53 ~ $ pip3.7 install --user update bokeh
Looking in links: /usr/share/pip-wheels
Requirement already satisfied: update in ./.local/lib/python3.7/site-packages (0.0.1)
Requirement already satisfied: bokeh in /usr/lib/python3.7/site-packages (1.3.4)
Requirement already satisfied: style==1.1.0 in ./.local/lib/python3.7/site-packages (from update) (1.1.0)
Requirement already satisfied: six>=1.5.2 in /usr/lib/python3.7/site-packages (from bokeh) (1.12.0)
Requirement already satisfied: numpy>=1.7.1 in /usr/lib/python3.7/site-packages (from bokeh) (1.17.3)
Requirement already satisfied: pillow>=4.0 in /usr/lib/python3.7/site-packages (from bokeh) (6.2.1)
Requirement already satisfied: tornado>=4.3 in /usr/lib/python3.7/site-packages (from bokeh) (6.0.3)
Requirement already satisfied: PyYAML>=3.10 in /usr/lib/python3.7/site-packages (from bokeh) (5.1.2)
Requirement already satisfied: Jinja2>=2.7 in /usr/lib/python3.7/site-packages (from bokeh) (2.10.3)
Requirement already satisfied: packaging>=16.8 in /usr/lib/python3.7/site-packages (from bokeh) (19.2)
Requirement already satisfied: python-dateutil>=2.1 in /usr/lib/python3.7/site-packages (from bokeh) (2.8.0)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/lib/python3.7/site-packages (from Jinja2>=2.7->bokeh) (1.1.1)
Requirement already satisfied: pyparsing>=2.0.2 in /usr/lib/python3.7/site-packages (from packaging>=16.8->bokeh) (2.4.2)
However this hasn't worked. So I've tried uninstalling Bokeh, and with the intension of re-installing however I get an error:
411:03 ~ $ pip3.7 uninstall bokeh
Uninstalling bokeh-1.3.4:
Would remove:
/usr/bin/bokeh
/usr/lib/python3.7/site-packages/bokeh-1.3.4.dist-info/*
/usr/lib/python3.7/site-packages/bokeh/*
Proceed (y/n)? y
ERROR: Exception:
Traceback (most recent call last):
File "/usr/lib/python3.7/shutil.py", line 566, in move
os.rename(src, real_dst)
OSError: [Errno 18] Invalid cross-device link: '/usr/bin/bokeh' -> '/tmp/pip-uninstall-gd_j1_do/bokeh'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 153, in _main
status = self.run(options, args)
File "/usr/lib/python3.7/site-packages/pip/_internal/commands/uninstall.py", line 79, in run
auto_confirm=options.yes, verbose=self.verbosity > 0,
File "/usr/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 755, in uninstall
uninstalled_pathset.remove(auto_confirm, verbose)
File "/usr/lib/python3.7/site-packages/pip/_internal/req/req_uninstall.py", line 394, in remove
moved.stash(path)
File "/usr/lib/python3.7/site-packages/pip/_internal/req/req_uninstall.py", line 283, in stash
renames(path, new_path)
File "/usr/lib/python3.7/site-packages/pip/_internal/utils/misc.py", line 338, in renames
shutil.move(old, new)
File "/usr/lib/python3.7/shutil.py", line 581, in move
os.unlink(src)
PermissionError: [Errno 13] Permission denied: '/usr/bin/bokeh'
Any help with this would be appreciated.

You can't uninstall pre-installed packages from https://www.pythonanywhere.com/batteries_included/
The best way to upgrade would be update of the whole system image from "fishnchips" to "haggis". See https://help.pythonanywhere.com/pages/ChangingSystemImage

Related

KeyError: 'arm64' in pyenv using nodeenv to install node 16.19.0

Attempting to install dependencies for the kolibri open source environment using pyenv and python virtualenv. Successfully installed python 3.9.9 and attempting to install node and yarn using nodeenv but continue running into this log for any attempt:
(kolibri-py3.9) aleesmith#myMB kolibri % nodeenv --python-virtualenv --node 16.19.0
* Install prebuilt node (16.19.0) Traceback (most recent call last):
File "/Users/aleesmith/.pyenv/versions/kolibri-py3.9/bin/nodeenv", line 33, in <module>
sys.exit(load_entry_point('nodeenv==1.3.3', 'console_scripts', 'nodeenv')())
File "/Users/aleesmith/.pyenv/versions/3.9.9/envs/kolibri-py3.9/lib/python3.9/site-packages/nodeenv.py", line 1076, in main
create_environment(env_dir, opt)
File "/Users/aleesmith/.pyenv/versions/3.9.9/envs/kolibri-py3.9/lib/python3.9/site-packages/nodeenv.py", line 905, in create_environment
install_node(env_dir, src_dir, opt)
File "/Users/aleesmith/.pyenv/versions/3.9.9/envs/kolibri-py3.9/lib/python3.9/site-packages/nodeenv.py", line 686, in install_node
node_url = get_node_bin_url(opt.node)
File "/Users/aleesmith/.pyenv/versions/3.9.9/envs/kolibri-py3.9/lib/python3.9/site-packages/nodeenv.py", line 512, in get_node_bin_url
'arch': archmap[platform.machine()],
KeyError: 'arm64'
I am using an M1 MacBook Air using 13.1 (22C65) OS and wondering if that contributes to the issue
I made sure that nodeenv was properly installed and was met with
Requirement already satisfied: nodeenv in /Users/aleesmith/.pyenv/versions/3.9.9/envs/kolibri-py3.9/lib/python3.9/site-packages (1.3.3)
indicating that it's already installed.

Airflow SQSSensor message filtering

Given below json:
{ "Model" : "level1" }
what is the right combination of message_filtering_match_values and message_filtering_config values? I try below but it fails:
model_operator = SQSSensor(
task_id='model_operator',
dag=dag,
sqs_queue='https://sqs.somewhere/somequeue.fifo',
aws_conn_id='aws_default',
message_filtering='jsonpath',
message_filtering_config='Model[*]',
message_filtering_match_values=['level1'],
mode='reschedule')
Error message is:
Broken DAG: [/usr/local/airflow/dags/test_dag.py] Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/airflow/utils/decorators.py", line 94, in wrapper
result = func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/airflow/models/baseoperator.py", line 414, in __init__
"arguments were:\n**kwargs: {k}".format(c=self.__class__.__name__, k=kwargs, t=task_id),
airflow.exceptions.AirflowException: Invalid arguments were passed to SQSSensor (task_id: model_operator). Invalid arguments were:
**kwargs: {'message_filtering': 'jsonpath', 'message_filtering_config': 'Model[*]', 'message_filtering_match_values': ['level1']}
The message_filtering / message_filtering_config / message_filtering_match_values were added recently in PR it was released in Amazon provider version 2.2.0
From the traceback we can see that these parameters are not recognized by the operator which means that you are running an older version of the Amazon provider.
You should upgrade the Amazon provider to the latest version.
pip install apache-airflow-providers-amazon --upgrade
It's also recommended to read the documentation about constraint files.
You didn't mention what Airflow version you are running nor what version of the Amazon provider so note to read the change logs in case you are upgrading major version.

Getting error while running buildout for Setting Plumi and Zope Server on Linux using command "python3 bootstrap.py -c production.cfg"

I was installing Plumi for creating a production site. after installing plumi.app i faced below error whie running buildout using command : python3 bootstrap.py -c production.cfg
Note:: Zope is installed and zope user is added..
The ERROR IS BELOW::enter image description here
root#Saif:/home/plumi.app# /bin/python3 bootstrap.py && ./bin/buildout -v
ez_setup.py is deprecated and when using it setuptools will be pinned to 33.1.1 since it's the last version that supports setuptools self upgrade/installation, check https://github.com/pypa/setuptools/issues/581 for more info; use pip to install setuptools
Downloading https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip
Extracting in /tmp/tmpvwkpnumd
Now working in /tmp/tmpvwkpnumd/setuptools-33.1.1
Building a Setuptools egg in /tmp/tmpgfkbh3om
warning: no files found matching '*' under directory 'setuptools/_vendor'
/tmp/tmpgfkbh3om/setuptools-33.1.1-py3.8.egg
Couldn't find index page for 'zc.buildout' (maybe misspelled?)
Couldn't find index page for 'zc.buildout' (maybe misspelled?)
No local packages or working download links found for zc.buildout
error: Could not find suitable distribution for Requirement.parse('zc.buildout')
Traceback (most recent call last):
File "bootstrap.py", line 171, in <module>
raise Exception(
Exception: Failed to execute command:
'/bin/python3', '-c', 'from setuptools.command.easy_install import main; main()', '-mZqNxd', '/tmp/tmpgfkbh3om', 'zc.buildout'
root#Saif:/home/plumi.app# ^C
root#Saif:/home/plumi.app# python3 bootstrap.py -c production.cfg
ez_setup.py is deprecated and when using it setuptools will be pinned to 33.1.1 since it's the last version that supports setuptools self upgrade/installation, check https://github.com/pypa/setuptools/issues/581 for more info; use pip to install setuptools
Downloading https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip
Extracting in /tmp/tmp6dqehae9
Now working in /tmp/tmp6dqehae9/setuptools-33.1.1
Building a Setuptools egg in /tmp/tmpdja0839z
warning: no files found matching '*' under directory 'setuptools/_vendor'
/tmp/tmpdja0839z/setuptools-33.1.1-py3.8.egg
Couldn't find index page for 'zc.buildout' (maybe misspelled?)
Couldn't find index page for 'zc.buildout' (maybe misspelled?)
No local packages or working download links found for zc.buildout
error: Could not find suitable distribution for Requirement.parse('zc.buildout')
Traceback (most recent call last):
File "bootstrap.py", line 171, in <module>
raise Exception(
Exception: Failed to execute command:
'/usr/bin/python3', '-c', 'from setuptools.command.easy_install import main; main()', '-mZqNxd', '/tmp/tmpdja0839z', 'zc.buildout'
warning: no files found matching '*' under directory 'setuptools/_vendor'
I found out that setuptools version 33.1.1 doesn't have vendor folder.
https://github.com/pypa/setuptools/tree/v33.1.1/setuptools

failed to fetch nginx packages

Failed to fetch http://nginx.org/packages/mainline/debian/dists/jessie/InRelease Unable to find expected entry 'nginx/binary-armhf/Packages' in Release file (Wrong sources.list entry or malformed file)
Armhf packages are not built by nginx.org. List of supported architectures: http://nginx.org/en/linux_packages.html#mainline

zc.buildout 2.0.0 release somehow ends up breaking Plone buildouts

I am trying to run old Plone 3.3 buildout.cfg. In [versions] I pin down buildout as the following:
cat buildout.cfg|grep -i zc.buildout
zc.buildout = 1.4.3
However, for some reason bootstrap.py generated bin/buildout ends up using the latest 2.0.0 release:
cat bin/buildout|grep -i zc.buildout
'/srv/plone/x/eggs/zc.buildout-2.0.0-py2.4.egg',
Which fails when trying to run bin/buildout:
An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/tmp/tmpjc_Zhu/zc.buildout-2.0.0-py2.4.egg/zc/buildout/buildout.py", line 1808, in main
File "/tmp/tmpjc_Zhu/zc.buildout-2.0.0-py2.4.egg/zc/buildout/buildout.py", line 455, in install
File "/tmp/tmpjc_Zhu/zc.buildout-2.0.0-py2.4.egg/zc/buildout/buildout.py", line 888, in _maybe_upgrade
File "/tmp/tmpjc_Zhu/zc.buildout-2.0.0-py2.4.egg/zc/buildout/easy_install.py", line 759, in install
File "/tmp/tmpjc_Zhu/zc.buildout-2.0.0-py2.4.egg/zc/buildout/easy_install.py", line 578, in install
TypeError: get_dist() takes exactly 4 arguments (3 given)
*********************************************
Overwriting versions.cfg
How to make buildout to bootstrap itself as 1.4.3 (compatible version)?
This concerns only fresh runs of this buildout.cfg. On my old system which uses zc.buildout 1.4.3 already I cannot repeat the problem.
Looks like you need to use this bootstrap.py:
http://downloads.buildout.org/1/bootstrap.py
This one is not good:
http://svn.zope.org/repos/main/zc.buildout/trunk/bootstrap/bootstrap.py
More details here:
https://github.com/miohtama/senorita.plonetool/commit/75f54c818801e9eeb10c38962e5ccc58f8b2f031

Resources