Skip to content

pyenv installation notes

Bob Myhill edited this page Oct 12, 2025 · 6 revisions

Troubleshooting

  • Is pyenv local the expected version in all subdirectories? Resetting doesn't always work...
  • Is pycddlib not working? See notes at the bottom.

Notes on installation

  • You may need to reinstall xcode
  • You may need to reinstall gbd and cddlib with brew
  • Beware multiple versions of XCode
  • Make sure clang is used: unset CC CXX CFLAGS CPPFLAGS LDFLAGS; env CC=clang

You may have to reinstall a version of pyenv to get pycddlib to work (I haven't yet found a workaround): pyenv uninstall pyenv install

  • If you have to install both pycddlib-standalone and pycddlib, do pycddlib-standalone first:

python -m pip install --no-cache-dir --force-reinstall pycddlib-standalone python -m pip install --no-cache-dir --force-reinstall pycddlib python -m pip install numpy scipy sympy python -m pip install matplotlib cvxpy python -m pip install numba==0.63.0b1

pycddlib (with pyenv) troubleshooting

The combination of pycddlib/pycddlib-standalone with pyenv is very fragile. Do not uninstall or reinstall. If you have to do this, just installation is not enough, you also have to purge the contents of the pyenv directory:

python -m pip uninstall pycddlib-standalone pycddlib

PYENV_VERSION=`pyenv local`

rm -fr ~/.pyenv/versions/${PYENV_VERSION}/lib/*/site-packages/pycdd*

rm -fr ~/.pyenv/versions/${PYENV_VERSION}/lib/*/site-packages/cdd*

Then install

python -m pip install --no-cache-dir --force-reinstall pycddlib-standalone

python -m pip install --no-cache-dir --force-reinstall pycddlib

Clone this wiki locally