Installing PL/Python2 on Ubuntu for PostgreSQL 12 - python-2.7

PL/Python, and specifically PL/Python 2, is a requirement for the MADlib extension - which appears to support Postgres 9.2+. I am using Postgres 12 on Ubuntu 20.04.
Unfortunately, while I have symlinked Python2.7 to be the target for generic python, and while I have managed to download and build MADlib, I still cannot enable it due to it requiring PL/Python2 (aka plpythonu, or plpython2u) - which is nowhere to be found in the repos, and all documentation is silent on the issue (despite claiming that Python 2 is the default version).
Is there any way to install it from another source despite it being unsupported?

Related

How to install a newer version of libstdc++ on Centos 7

I am running an application and it throws me an error saying:
"C++ header 'string_view' is required. You need to install a newer libstdc++ on the host system."
Can someone guide me on what I need to do to get a newer version of "libstdc++" on my machine?
Thanks
Try running yum provides libstdc++ to show you what package provided the library on your system. You can then check if those packages are available for update using yum list available | grep <that package> followed by yum update <that package>.
Facing the same issue, I built gcc from source. This way you get to choose your own version. It's actually pretty straightforard -- see Building GCC at https://gcc.gnu.org/wiki/InstallingGCC.

unable to install R package "nloptr" (R3.6.2 on Ubuntu 16.04) - C++ compiler issue

I'm having trouble installing the "car" package after upgrading R to 3.6.2 (from 3.4) on Ubuntu 16.04 due to (at least one) dependency (nloptr) that cannot be installed either. It seems to be a problem of the C++ compiler (it is using some deprecated "config" settings, however I'm lost trying to fix this).
I called the following command in R (from the terminal):
install.packages("nloptr")
Error Information:
Installing package into ‘/home/heike/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://ftp.fau.de/cran/src/contrib/nloptr_1.2.1.tar.gz'
Content type 'application/x-gzip' length 2448313 bytes (2.3 MB)
==================================================
downloaded 2.3 MB
* installing source package ‘nloptr’ ...
** package ‘nloptr’ successfully unpacked and MD5 sums checked
** using staged installation
'config' variable 'CPP' is deprecated
'config' variable 'CXXCPP' is deprecated
checking whether the C++ compiler works... no
configure: error: in /tmp/RtmpPLaJFA/R.INSTALL5e5ed06eeac/nloptr': configure: error: C++ compiler cannot create executables See config.log' for more details
ERROR: configuration failed for package ‘nloptr’
Steps taken so far
changed CRAN mirror and source.list entry
uninstalled and reinstalled R 3.6.2 (also on different machine), same issue remained
System Information
OS Version: Ubuntu 16.04 (x86_64-pc-linux-gnu (64-bit))
R Version: 3.6.2 (2019-12-12)
We have done a lot of work to make nloptr installation better. In essence, you have several choices:
if the system version of the nlopt library is present, use it -- that is the easiest so try installing it via sudo apt-get install libnlopt-dev and then reinstall
if it is not found, then a download of the source and build happens, and this seems to fail on your almost four year old Ubuntu system as it is hard to support all flavours --- but this works swimmingly on newer ones (I run Ubuntu too, but currently 19.10)
there are binaries for you as, see the Ubuntu packages page -- however these may not match your current R version which is mismatches to your distro R version
dependening on where you got R from (did you install a .deb?) you could use the Michael Rutter PPAs to get a current r-cran-nloptr
All this can also be discussed in detail on the r-sig-debian list for R on Debian and Ubuntu.
Edit: In response to the comment below:
To see what package apt knows about, do apt-cache policy r-cran-nloptr. Per the link I gave above we know Ubuntu has a r-cran-nloptr for your (very old) Xenial installation. However it will clash with the very new and current R you have running. Such as the costs of mixing and matching.
To access the Rutter PPAs and its over four thousand current binaries see the fourth paragraph at the top of the Ubuntu at CRAN README
Edit 2: I may have been too pessimistic. The Rutter PPA for the current R binaries has trusty, xenial and bionic. See https://launchpad.net/~marutter/+archive/ubuntu/c2d4u3.5

How to upgrade a standalone Jetty installation on Windows?

This is somewhat embarrassing, but I'm totally lost when it comes to upgrading from Jetty 9.2 to 9.4. 9.2 was installed two years ago using jetty-9.2.0-setup-package.zip. The file contained commons-deamon and more so that the install could be done using command
create-jetty-dist.bat d:\jetty9 Jetty9 80 50001 D:\etc\gateway NO
Now I've downloaded the latest version from https://www.eclipse.org/jetty/download.html]1 - jetty-distribution-9.4.14.v20181114.zip - but, I cannot figure out how to upgrade the installation. Mostly I find docs about Maven and update the POM, but the installation is standalone and no Maven. There is a Chapter 36. Upgrading Jetty about upgrading - but still does not help much
All my Google-skills does not help either.
I have not found the guts yet to simply replace the folder
D:\jetty9\jetty
Maybe I do overthink and the solution is that simple. But still it keeps bugging me that I cannot seem to find an install file for 9.4 like I did for 9.2
I did overthink - is was almost only to replace the 9.2 distribution folder with the 9.4. But for the service to be reconfigured and also to ensure that all changes from 9.2 to 9.4 was implemented me and my colleague had to do:
Edit the .bat file that came with the jetty-9.2.0-setup-package to support 9.4
Off course change the reference for all 9.2 to 9.4 distribution in the script
9.2 used "logging", 9.4 uses "console-capture"
9.2 used "jetty.port", 9.4 uses "jetty.http.port"
Copy the 9.4 distribution file to the folder where the .bat-file is to be found in the setup-package
Then we sc delete jetty9 the service and ran the script.
In short, that was what we needed to do.

Installing graph-tool - ubunutu 14.04 - anaconda - jupyter notebook - python 2.7

So I have been trying to install the graph-tool module on my Ubuntu system all day now. I just cant seem to figure it out. Basically I want to use the package in jupyter notebook (in an anaconda enviroment). I followed several installation instructions, but nothing seems to work.
This for example: https://gist.github.com/dlozeve/ed59bba8bc8cb9b21e2af36cc9766938
I get to the configuration (adjusting for the fact that I am using python2.7),
./configure --prefix=/home/timo/anaconda2/envs/graph/ --with-python-module-path=/usr/local/lib/python2.7/site-packages
yielding:
configure: error: *** A compiler with support for C++14 language features is required.
Does anyone know what I might be doing wrong? Or as a simpler way to get graph-tool to work in my jupyter notebook?
Thank you very much!
The configure script is telling you exactly what is wrong: You need a compiler with C++14 support. This just means that your GCC is too old.
(You haven't told us any pertinent detail, such as the compiler version you have, library versions, etc, so we can only guess. But luckily, the configure diagnostics is crystal clear.)
A simpler way to install graph-tool would be for you to upgrade your distro (14.04 is outdated) and use the Ubuntu packages, as described here: https://git.skewed.de/count0/graph-tool/wikis/installation-instructions#debian-ubuntu
As graph-tool does not seems to run in an anaconda environment and Ubuntu 14.04 does not have support the latest C++ compiler that is needed, I did install Ubuntu 16.04 and followed firstly [https://www.google.de/amp/s/www.rosehosting.com/blog/how-to-install-jupyter-on-an-ubuntu-16-04-vps/amp/] and then finally installed graph-tool as described on the homepage.
This way I get to use jupyter notebook and am still able to import graph-tool.

How to find the correct version of PyBindGen for Python Bindings

Currently, I am working on the Ns3 simulator and now trying to enable the pyviz visualizer. According to the doc, I have downloaded the three dependencies which are
py27-pygtk
py27-pygoocanvas
py27-pygraphviz
Now in order to use this, I still need to enable the python bindings which I used /usr/bin/python2.7 ./waf configure wanna to check what needs for enabling python bindings. The result shows that
Python Bindings : not enabled (PyBindGen version not correct and newer version could not be retrieved)
So I checked the Doc and downloaded PyBindGen (version 0.18.0). The output shows
Installed /Library/Python/2.7/site-packages/PyBindGen-0.18.0-py2.7.egg
Processing dependencies for PyBindGen==0.18.0
Finished processing dependencies for PyBindGen==0.18.0
After I ran the configuration check the results still showed that PyBindGen version not correct and newer version could not be retrieved
So I presume that is that because I installed the wrong version of PyBindGen? If so how can I get the suitable version for enabling Python Binding?
I would appreciate if there is someone who can help me figure it out. Many thanks.
S.
According to the Google Group
Here is the resolution(tested it worked):
follow the instruction
hg clone http://code.nsnam.org/ns-3-allinone
cd ns-3-allinone && ./download.py
This will solve the Python Binding problem
Updated: after downloading this version of ns3. Solving the python binding problem. Then there will be another problem after running
./waf configure
it will show the result like this:
PyViz visualizer: not enabled (Missing python modules: gtk, goocanvas, pygraphviz)
Even though I have installed all of the three dependencies. So after some researches I found that there has another questions post So there is a guy gave the guessing that
" Waf found the standard Python here (/usr/bin/python is the Apple path), and you installed the python libraries using MacPorts.
Most probably you'll need to configure Python to point to the MacPort-based Python, or it will not see what you installed."
So according to How to: Macports select python
here is the solution:
port select --list python
sudo port select --set python python27
Hope it will help anyone come afterwards to use this.
S.