Re: [IMP-users] changing the python version in IMP
To: Help and discussion for users of IMP <>, Merav Braitbard <>
Subject: Re: [IMP-users] changing the python version in IMP
From: Ben Webb <>
Date: Thu, 5 Sep 2019 14:05:02 -0700
On 8/26/19 4:52 AM, Merav Braitbard wrote:
my default version of python is 2.7, but when I tried to run imp with
this version I've got an error that numpy version is old.
This isn't an IMP error. My guess is that something else you're using
(maybe scipy or scikit) needs a newer numpy. The simplest solution would
be to upgrade numpy (or downgrade whichever package wants the newer numpy).
So I tried to use python 3.7 like this: > setup_environment.sh python3.7 modeling.py
This won't work because Python extensions (lib/_IMP_xxx.so) must be
rebuilt if you want to use a different Python version, as the Python C
ABI changed between Python 2.7 and Python 3.7. This would require
rerunning cmake and make (after clearing the CMake cache), telling cmake
to use the different version of Python (e.g. by setting the
PYTHON_INCLUDE_PATH and PYTHON_LIBRARIES CMake variables).