So, summarizing, the actual problem is that the directory containing the imported packages should be used instead of a specific package. That is, instead of
add2virtualenv /Library/Python/2.7/site-packages/scipy
It should be
add2virtualenv /Library/Python/2.7/site-packages
Beware: this solution has the drawback that you not only include scipy, but other packages in /Library/Python/2.7/site-packages
.
An alternative solution with spatial resolution could be the symbolic scipy directory inside the virtual env site package. This can be done in your virtual env using:
cdsitepackages ln -s /Library/Python/2.7/site-packages/scipy scipy
All loans go to @rubik (see comments)
Check this answer to find the path to your sites if it differs from the one used here.
source share