-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Problem: Packages that depend on numpy and scipy may fail to install.
How do I install gcc-4.8?
Solution:
If you omit system python packages, you won't get system numpy or scipy. This may be desirable, from the loom developers point of view. So we'll install the exact version of gcc and gfortran we'd need to compile scipy and numpy from scratch.
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.8 g++-4.8 gfortran-4.8 libblas-dev liblapack-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-4.8 20
sudo update-alternatives --config gcc
sudo update-alternatives --config g++
sudo update-alternatives --config gfortran
Problem: #error This file was generated by an older version of protoc which is...
Solution:
rm include/distributions/io/schema.pb.cc
make proto_buf
Problem: ImportError: No module named dateutil.parser or contextlib2
Solution:
sudo apt-get install libfreetype6-dev libpng-dev
sudo pip install python-dateutil contextlib2 matplotlib pymetis mock pandas
Problem: distributions include dir not found or /usr/bin/ld: cannot find -ldistributions_shared while trying to install or test distributions.
Solution:
Installing just the Python package
Install distributions using setup.py first. Run with sudo if you need to install to system:
Inside the distributions directory:
export LDFLAGS="-L$(pwd)/lib"
python setup.py installNow, you can run make install and it will correctly install the package and pass cmake_test.
Installing with the library to the system
Mysteriously, the way the build system for this project is configured, installing to system is challenging.
First, build the libraries and includes. Then add outputs to the system directories where they are expected to be found.
DISTRIBUTIONS_USE_PROTOBUF=1 make release_cc
sudo cp lib/* /usr/lib
sudo cp -r include/distributions /usr/local/include
make -j8
sudo make installNote, on my system, a test fails with make but the python package is successfully built.