Created
July 15, 2014 21:56
-
-
Save dmpeters/2e5a968ce78953fc66c2 to your computer and use it in GitHub Desktop.
librets installations with python bindings only
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Debian 7 x64, Ubuntu 14.04 x64, Ubuntu 12.04.4 x64 | |
*NOTE (tested on Digital Ocean VM's w/ > 512MB of RAM - gcc runs out of memory on VM's <= 512 MB) | |
apt-get update | |
aptitude safe-upgrade | |
apt-get install build-essential libboost-all-dev libcurl4-gnutls-dev autoconf antlr swig python-dev | |
*NOTE (for python 3 support add 'python3-dev' to the end of line 5) | |
cd /tmp | |
wget https://github.com/NationalAssociationOfRealtors/libRETS/archive/1.6.1.tar.gz | |
tar xzf 1.6.1.tar.gz | |
cd libRETS-1.6.1 | |
./autogen.sh | |
./configure --disable-perl --disable-ruby --disable-java --disable-dotnet --disable-php --enable-shared_dependencies | |
make | |
make install | |
# To Test | |
python | |
import librets | |
dir(librets) | |
librets.RETS_1_7_2 | |
librets.RETS_1_8 | |
librets.RETS_1_8_0 | |
To help others here that have had issues, if you use a different environment for your python libs (e.g. a virtualenv), after you do sudo make install
enter the environment you wish the library to be available in and cd to build/swig/python. Once there, run python setup.py install
Kind of annoying to deal with I know, but it works.
@corvuscrypto Thank you so much for that comment. I spent hours trying to figure out why librets wouldn't import in virtualenv. Then I read your comment and made it work.
For anyone else coming across this. This is what I did:
- Enter virtualenv
- I'm on Ubuntu 16.04, and I had to go to the folder at
/tmp/libRETS-1.6.1/build/swig/python3
- Run
python setup.py install
I can confirm this still works for Python 3.6.9
Thanks again!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I followed your instructions in librets_install.txt and am getting an import error when trying to import librets...any ideas?
I'm on Ubuntu 14.04.4 x64