question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Requirements installation fails with swig error

See original GitHub issue

We are having trouble installing the requirements file once curl’d down on Mac OSX Sierra with Python 2.7 and 3.6.1*., forcing the install with Python3 as such:

sudo curl https://raw.githubusercontent.com/automl/auto-sklearn/master/requirements.txt | xargs -n 1 -L 1 pip3 install

Most Python dependencies install without issue (we had most already), then we fail on pyfrf with the following trace:

Building wheels for collected packages: pyrfr
  Running setup.py bdist_wheel for pyrfr ... error
  Complete output from command /usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/46/rh_gbvxn2q19xbn10grfz3r00000gn/T/pip-build-2cdxyroo/pyrfr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /var/folders/46/rh_gbvxn2q19xbn10grfz3r00000gn/T/tmpz8iuzdtbpip-wheel- --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.12-x86_64-3.6
  creating build/lib.macosx-10.12-x86_64-3.6/pyrfr
  copying pyrfr/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/pyrfr
  running build_ext
  building '_regression' extension
  swigging pyrfr/regression.i to pyrfr/regression_wrap.cpp
  swig -python -c++ -I${CMAKE_SOURCE_DIR}/include -I./include -o pyrfr/regression_wrap.cpp pyrfr/regression.i
  unable to execute 'swig': No such file or directory
  error: command 'swig' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for pyrfr
  Running setup.py clean for pyrfr
Failed to build pyrfr
Installing collected packages: pyrfr
  Running setup.py install for pyrfr ... error
    Complete output from command /usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/46/rh_gbvxn2q19xbn10grfz3r00000gn/T/pip-build-2cdxyroo/pyrfr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/46/rh_gbvxn2q19xbn10grfz3r00000gn/T/pip-1zqi87gy-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build_ext
    building '_regression' extension
    swigging pyrfr/regression.i to pyrfr/regression_wrap.cpp
    swig -python -c++ -I${CMAKE_SOURCE_DIR}/include -I./include -o pyrfr/regression_wrap.cpp pyrfr/regression.i
    unable to execute 'swig': No such file or directory
    error: command 'swig' failed with exit status 1
    
    ----------------------------------------
Command "/usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/46/rh_gbvxn2q19xbn10grfz3r00000gn/T/pip-build-2cdxyroo/pyrfr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/46/rh_gbvxn2q19xbn10grfz3r00000gn/T/pip-1zqi87gy-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/46/rh_gbvxn2q19xbn10grfz3r00000gn/T/pip-build-2cdxyroo/pyrfr/

*Python3 was installed via Homebrew

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

12reactions
akreuzercommented, Jun 3, 2017

For building pyrfr you also need swig. Try brew install swig.

0reactions
manuelgomezricocommented, Jun 2, 2019

I have a mac and conda and I solved the problm with following instructions conda install clang_osx-64 clangxx_osx-64 swig I allowed me install the library autosklearn: pip install auto-sklearn from anaconda

Read more comments on GitHub >

github_iconTop Results From Across the Web

swig.exe not found: error when try install pylinkgrammar 0.2.14
Building wheel for pylinkgrammar (setup.py) error: ... Command 'swig.exe' failed. No such file or directory ... Failed to build pylinkgrammar.
Read more >
3 Getting started on Windows - SWIG.org
This chapter describes SWIG usage on Microsoft Windows. Installing SWIG and running the examples is covered as well as building the SWIG executable....
Read more >
Installation — AutoSklearn 0.15.0 documentation
In case you try to install Auto-sklearn on a system where no wheel files for the pyrfr package are provided (see here for...
Read more >
SWIG - Browse /swig/swig-2.0.9 at SourceForge.net
The SWIG executable and library files installed cannot currently be configured with a subset of target languages. Please see the Documentation section below...
Read more >
Installing psychopy in Pycharm fails - Coding
swig.exe not found: error when try install pylinkgrammar 0.2.14 ... solved the error. error: Microsoft Visual C++ 14.0 or greater is required. Get ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found