Help us understand the problem. What is going on with this article?

How to get PyCPX installed (OSX Yosemite, Canopy)

More than 5 years have passed since last update.

PyCPX is a python wrapper for the IBM CPlex. While it can be downloaded via pip and easy_install, we need several steps to successfull installation.

Environment:

Step 1: installing CPLEX

Step 2: installing PyCPX with linking CPLEX

  • Just executing pip install pycpx will produce the following error:
In file included from pycpx/pyconcert.cpp:255:

pycpx/cplex_interface.hpp:12:10: fatal error: 'ilcplex/ilocplexi.h' file not found

#include <ilcplex/ilocplexi.h>

We actually need to specify the include directory that you downloaded in Step 1! The answer is:

pip install --global-option='build_ext' --global-option=-I[the path where you downloaded CPLEX]/CPLEX_Studio1261/cplex/include pycpx

See also http://stackoverflow.com/questions/18783390/python-pip-specify-a-library-directory-and-an-include-directory

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away