I need to install plpython because I'm getting the error
could not access file "$libdir/plpython2": No such file or directory
when trying to do python manage.py migrate. I have seen different suggestions on how to install this package but none works for me because I need to be using python version 2.7 (some people suggested installing python 3.2) and I cannot run sudo apt-get install ... because I have to be working on a mac.
I have tried running
CREATE LANGUAGE plpython2u;
but I got the error
ERROR: could not access file "$libdir/plpython2": No such file or directory
Also, I have tried pip/brew install plpython
. But no result. Any suggestions?
Use brew install python to install python3 on the mac, current version is Python 3.6. 5 . If your mac has a python2 already, brew will ask for an upgrade, which is fine.
The Apple-provided build of Python is installed in /System/Library/Frameworks/Python. framework and /usr/bin/python , respectively.
If a language is installed into template1 , all subsequently created databases will have the language installed automatically. PL/Python is only available as an “untrusted” language, meaning it does not offer any way of restricting what users can do in it and is therefore named plpython3u .
If anybody has the same problem, I fixed this by uninstalling postgres and installing it using brew install postgres --with-python
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With