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

swig failed when installing paddleslim on macOS or Windows with python>=3.9 #1258

Closed
wanghaoshuang opened this issue Jul 6, 2022 · 0 comments

Comments

@wanghaoshuang
Copy link
Collaborator

wanghaoshuang commented Jul 6, 2022

Solution

macOS

Please install swig with cmd as below:

#  set environment variables to skip updating of brew
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_UPDATE_PREINSTALL=0
brew install swig

Windows

Please install swig from https://www.swig.org/download.html

Error log

Building wheels for collected packages: smac, pynisher, pyrfr
  Building wheel for smac (PEP 517) ... done
  Created wheel for smac: filename=smac-1.3.4-py3-none-any.whl size=218017 sha256=45271afe47f3457a6e77c2c53dd17b6605ff1ef69c68c0e5aacb75928c7aa779
  Stored in directory: /Users/wanghaoshuang/Library/Caches/pip/wheels/d0/cb/62/62c54ef694e4cf3846fdbbf788de91c86458ac4044973e7473
  Building wheel for pynisher (setup.py) ... done
  Created wheel for pynisher: filename=pynisher-0.6.4-py3-none-any.whl size=7043 sha256=349ecedf8ae6110e6342752b4712f007d3ad8dcd2fde1b68aacff7f3301fe2cd
  Stored in directory: /Users/wanghaoshuang/Library/Caches/pip/wheels/1d/de/5e/d4947b76b76ba27581d1e09f395eca1583a802203a41c04873
  Building wheel for pyrfr (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/wanghaoshuang/miniconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/qz/12m2q98n7kjdfn9mrtk2j1600000gn/T/pip-install-8qe9956_/pyrfr_29aadea9444645b08bc76c6003297fbc/setup.py'"'"'; __file__='"'"'/private/var/folders/qz/12m2q98n7kjdfn9mrtk2j1600000gn/T/pip-install-8qe9956_/pyrfr_29aadea9444645b08bc76c6003297fbc/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/qz/12m2q98n7kjdfn9mrtk2j1600000gn/T/pip-wheel-royxjobt
       cwd: /private/var/folders/qz/12m2q98n7kjdfn9mrtk2j1600000gn/T/pip-install-8qe9956_/pyrfr_29aadea9444645b08bc76c6003297fbc/
  Complete output (8 lines):
  [<setuptools.extension.Extension('pyrfr._regression') at 0x7f9409620070>, <setuptools.extension.Extension('pyrfr._util') at 0x7f94096200d0>]
  running bdist_wheel
  running build
  running build_ext
  building 'pyrfr._regression' extension
  swigging pyrfr/regression.i to pyrfr/regression_wrap.cpp
  swig -python -c++ -modern -py3 -features nondynamic -I./include -o pyrfr/regression_wrap.cpp pyrfr/regression.i
  error: command 'swig' failed: No such file or directory
  ----------------------------------------
  ERROR: Failed building wheel for pyrfr
@wanghaoshuang wanghaoshuang changed the title swig failed when installing paddleslim in macOS with python>=3.9 swig failed when installing paddleslim on macOS with python>=3.9 Jul 6, 2022
@wanghaoshuang wanghaoshuang changed the title swig failed when installing paddleslim on macOS with python>=3.9 swig failed when installing paddleslim on macOS or Windows with python>=3.9 Jul 6, 2022
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

1 participant