2

I use anaconda2. After I install virtualenv by run pip install virtualenv. when I run virtualenv test. It shows error:

New python executable in /home/ztgong/work/virtenvs/test/bin/python
/home/ztgong/work/virtenvs/test/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
ERROR: The executable /home/ztgong/work/virtenvs/test/bin/python is not functioning
ERROR: It thinks sys.prefix is u'/home/ztgong/work/virtenvs' (should be u'/home/ztgong/work/virtenvs/test')
ERROR: virtualenv is not compatible with this system or executable

what causes this problem? can anyone give some advises?

JustinGong
  • 41
  • 1
  • 8

1 Answers1

0

Might be late for this question, but solution present here worked for me.

  1. Try to find file libpython2.7.so.1.0

    find / -name libpython2.7.so.1.0

  2. Then add the resultant directory in file /etc/ld.so.conf. Simply write the directory name into this file.

  3. Run Command ldconfig

V.Aggarwal
  • 557
  • 4
  • 12