Skip to content
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

How to locate the directory of COIN-OR or COINMP in macOS? KeyError: 'COIN_INSTALL_DIR' #52

Closed
Henri-Lo opened this issue Jun 5, 2017 · 3 comments

Comments

@Henri-Lo
Copy link

Henri-Lo commented Jun 5, 2017

I have installed COINMP through brew's homebrew/science tap such that

$ brew tap homebrew/science; brew install coinmp

and now I am trying to install CYLP in order to use it with CVXPY

$ easy_install cylp

but

Exception: Please set the environment variable COIN_INSTALL_DIR to the location of the COIN installation

so where is this directory located and how to specify it? Does there exist some settings file for setting up the envvar? .profile?

@waldstein1983
Copy link

I have the same error on ubuntu 16.04

@tkralphs
Copy link
Member

The answers are different for homebrew and Linux. For homebrew, the exact location depends on your version of homebrew and the version of coinmp. If you do

brew list coinmp

Then the common prefix is the right value of the environment variable. On my machine, it's

/usr/local/Cellar/coinmp/1.7.3/

On linux, if cbc is installed with apt, there is no easy solution at the moment. Installing cbc from source is probably the best and this should work out of the box. For a full explanation, see #47.

@Henri-Lo
Copy link
Author

Henri-Lo commented Jun 28, 2017

@tkralphs thank you, I think I resolved the COIN_INSTALL_DIR problem but getting now odd TypeError: a bytes-like object is required, not 'str' error. Can this problem be related to COINMP, CYLP or the Anaconda installation? Or is it related to something else?

I moved the new issue here, #54, and I think the issue 52 is now resolved at least for macOS.

$ export COIN_INSTALL_DIR=/usr/local/Cellar/coinmp/1.7.3_1/; easy_install cylp
Searching for cylp
Reading https://pypi.python.org/simple/cylp/
Downloading https://pypi.python.org/packages/60/90/90d2e23a6423d7461d34bedaf05978787f23b64b82d3619430ed10e468e9/cylp-0.2.3.6.tar.gz#md5=189b9c0ba97bd2e4e4196ed44610913b
Best match: cylp 0.2.3.6
Processing cylp-0.2.3.6.tar.gz
Writing /var/folders/hl/p85gqql56l5d_7729280zbch0000gn/T/easy_install-4wvvb_v5/cylp-0.2.3.6/setup.cfg
Running cylp-0.2.3.6/setup.py -q bdist_egg --dist-dir /var/folders/hl/p85gqql56l5d_7729280zbch0000gn/T/easy_install-4wvvb_v5/cylp-0.2.3.6/egg-dist-tmp-nljbeyta
Traceback (most recent call last):
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/sandbox.py", line 156, in save_modules
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/sandbox.py", line 197, in setup_context
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/sandbox.py", line 246, in run_setup
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/sandbox.py", line 276, in run
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/sandbox.py", line 245, in runner
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/sandbox.py", line 47, in _execfile
  File "/var/folders/hl/p85gqql56l5d_7729280zbch0000gn/T/easy_install-4wvvb_v5/cylp-0.2.3.6/setup.py", line 397, in <module>
  File "/Users/user/anaconda3/lib/python3.5/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/Users/user/anaconda3/lib/python3.5/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/Users/user/anaconda3/lib/python3.5/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/command/bdist_egg.py", line 152, in run
  File "/Users/user/anaconda3/lib/python3.5/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/Users/user/anaconda3/lib/python3.5/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/command/egg_info.py", line 188, in run
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/command/egg_info.py", line 403, in write_pkg_info
  File "/Users/user/anaconda3/lib/python3.5/distutils/dist.py", line 1107, in write_pkg_info
    self.write_pkg_file(pkg_info)
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/dist.py", line 53, in write_pkg_file
  File "/Users/user/anaconda3/lib/python3.5/distutils/util.py", line 471, in rfc822_escape
    lines = header.split('\n')
TypeError: a bytes-like object is required, not 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/user/anaconda3/bin/easy_install", line 6, in <module>
    sys.exit(setuptools.command.easy_install.main())
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/command/easy_install.py", line 2274, in main
  File "/Users/user/anaconda3/lib/python3.5/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/Users/user/anaconda3/lib/python3.5/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/Users/user/anaconda3/lib/python3.5/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/command/easy_install.py", line 409, in run
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/command/easy_install.py", line 664, in easy_install
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/command/easy_install.py", line 694, in install_item
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/command/easy_install.py", line 875, in install_eggs
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/command/easy_install.py", line 1114, in build_and_install
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/command/easy_install.py", line 1100, in run_setup
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/sandbox.py", line 249, in run_setup
  File "/Users/user/anaconda3/lib/python3.5/contextlib.py", line 77, in __exit__
    self.gen.throw(type, value, traceback)
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/sandbox.py", line 197, in setup_context
  File "/Users/user/anaconda3/lib/python3.5/contextlib.py", line 77, in __exit__
    self.gen.throw(type, value, traceback)
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/sandbox.py", line 168, in save_modules
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/sandbox.py", line 143, in resume
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/pkg_resources/_vendor/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/sandbox.py", line 156, in save_modules
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/sandbox.py", line 197, in setup_context
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/sandbox.py", line 246, in run_setup
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/sandbox.py", line 276, in run
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/sandbox.py", line 245, in runner
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/sandbox.py", line 47, in _execfile
  File "/var/folders/hl/p85gqql56l5d_7729280zbch0000gn/T/easy_install-4wvvb_v5/cylp-0.2.3.6/setup.py", line 397, in <module>
  File "/Users/user/anaconda3/lib/python3.5/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/Users/user/anaconda3/lib/python3.5/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/Users/user/anaconda3/lib/python3.5/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/command/bdist_egg.py", line 152, in run
  File "/Users/user/anaconda3/lib/python3.5/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/Users/user/anaconda3/lib/python3.5/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/command/egg_info.py", line 188, in run
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/command/egg_info.py", line 403, in write_pkg_info
  File "/Users/user/anaconda3/lib/python3.5/distutils/dist.py", line 1107, in write_pkg_info
    self.write_pkg_file(pkg_info)
  File "/Users/user/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/dist.py", line 53, in write_pkg_file
  File "/Users/user/anaconda3/lib/python3.5/distutils/util.py", line 471, in rfc822_escape
    lines = header.split('\n')
TypeError: a bytes-like object is required, not 'str'

@Henri-Lo Henri-Lo changed the title How to locate the directory of COIN-OR or COINMP? KeyError: 'COIN_INSTALL_DIR' How to locate the directory of COIN-OR or COINMP in macOS? KeyError: 'COIN_INSTALL_DIR' Jun 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants