-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error during pip install of cylp, os environ COIN_INSTALL_DIR not set with apt install of coin #47
Comments
The If you want to get |
I tried installing from source too, but couldn't get that working. (There were mysterious compilation errors, and the automatic installation of dependencies didn't work correctly) Then I gave up and tried apt again, then source again etc. After several hours of trying different things, For the record, if I enter Then after Sorry I can't be more help with the solution. The good news is that I do have the system up and running now, so there's no need to rush to fix anything for my benefit. Although the installation process is extremely unpleasant. I believe that making it work with |
I just submitted issue #48 I'm not sure whether that bug that I'm experiencing is due to a bad installation. Probably not, but I just thought I'd mention the possibility in this thread. |
I had forgotten that |
Now I'm trying to install it on another machine and I'm having troubles again. It took a while, but now I've got something that can reproducibly compile cylp into a I think this script should replace the instructions on the README. Those instructions don't explicitly state all steps.
mwe.py:
|
Any update on supporting the apt install of cbc? |
I don't know anything about the backend of apt. Perhaps we can use my scripts from #57 to make this installable with apt? |
I guess that most of what is going on in the scripts from #57 would be unnecessary in Linux, since most of the Python dependencies would either be installed by default or you would want to also install them with |
Installing Cbc from source does not work out of the box. (That's why I created this issue.) It's not the case that python dependencies are installed by default, since the specific version of numpy matters during compilation.
So really you need to do the compilation inside a virtual env with the right dependencies. |
In case some people have trouble installing CyLP on Debian, this is the script I used : #!/usr/bin/bash
set -e
# set -x
# Install dependencies
sudo apt-get install -y git pkg-config coinor-libcbc-dev coinor-libosi-dev coinor-libcoinutils-dev coinor-libcgl-dev
# This file is required by the Cylp installer (not present in standard coinor-libcbc-dev package of all debian version)
CBC_ADDLIBS="/usr/share/coin/doc/Cbc/cbc_addlibs.txt"
# If it does not exist,
if [[ ! (-f "$CBC_ADDLIBS") ]]; then
# Clone the Cbc repository
if [[ ! (-d "Cbc/") ]]; then
git clone https://github.com/coin-or/Cbc.git Cbc/
fi
# Go into the directory
cd Cbc/
# Go to the same version as the one in the official repositories
git checkout releases/`pkg-config --modversion cbc`
# Configure and install (in the current directory) the library
./configure -C
make
make install
# Create a symlink in the default system folder
sudo ln -s "$(pwd)/share/coin/doc/Cbc/cbc_addlibs.txt" "$CBC_ADDLIBS"
fi
echo
echo "----------------------------------"
echo "In order to install CyLP, please use the following command in you Python virtual environment:"
echo
echo "COIN_INSTALL_DIR=/usr/ pip install --pre cylp"
echo
echo "----------------------------------"
echo
exit 0 I've used it on Debian 9 and haven't tested on any other distribution, I'm just posting this here in case it can help other people. |
Thanks, it should be possible to make it so that one does not have to build Cbc from source, as you did. I still plan to do this. |
This should be fixed now in the latest version of the setup script (see ddff1a3). Documentation will be updated shortly. |
I used |
I'm not able to install cylp. What's the current status of this? Can someone just show me a Dockerfile? Maybe that's the easiest way to test and document how to install something with such a messy installation process. e.g. here's a Dockerfile based on @ir1979 's steps, which don't work for me.
@tkralphs has the documentation been updated yet? |
Here's another attempt, trying to compile CBC from source because @tkralphs said it's more likely to succeed.
This one gives the error:
Note that even though CBC has been compiled and installed, no file exists on my hard drive called |
Sorry, no , I did not get back to updating the documentation, but @ir1979's recipe should work. What went wrong exactly? There was no error message in your output. For the installation from source, the problem is that you didn't install Cbc in
then I think it should work. |
There was a small issue with
|
I was also having issues installing CyLP on Debian. But rather than missing file errors I was encountering compiler errors. Using Debian Bullseye, Python 3.7 installed via miniconda.
Eventually I got it to work using essentially the same code as @ir1979 but at the end installing CyLP from the github master branch. But I was attempting lots of different approaches, including installing from source, so I cannot guarantee that just these steps will work for others. |
I installed COIN using
sudo apt-get install coinor-cbc
on an ubuntu machine. (Which is the suggested method of installation on the official coin page).Now when I try to install
cylp
usingpip
, I get the following error:What should
COIN_INSTALL_DIR
be set to if I installed coin through apt? I have no idea where the location of my COIN installation is. How do I find out?Ideally this error message should say something like:
I don't know why this environment variable wasn't permanantly set upon install of COIN. I did logout and log back in to refresh the environment. That didn't fix it.
The text was updated successfully, but these errors were encountered: