Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

ErrorCorner

ErrorCorner Logo ErrorCorner Logo

ErrorCorner Navigation

  • Home
  • Contact Us
  • About Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Contact Us
  • About Us
Home/ Questions/Q 435
Next
Answered
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 0
Kenil Vasani
Asked: December 11, 20202020-12-11T20:36:49+00:00 2020-12-11T20:36:49+00:00In: Python

python: error while loading shared libraries: libpython3.4m.so.1.0: cannot open shared object file: No such file or directory

  • 0

I have created a python virtual environment using virtualenv, after activating it, I can see where is Python installed in my shell as following:

(virtualenv-test) bash-4.1$ whereis python
python: /usr/bin/python2.6 /usr/bin/python2.6-config /usr/bin/python
/usr/lib/python2.6 /usr/lib64/python2.6 /usr/X11R6/bin/python2.6
/usr/X11R6/bin/python2.6-config /usr/X11R6/bin/python
/usr/bin/X11/python2.6 /usr/bin/X11/python2.6-config
/usr/bin/X11/python /usr/include/python2.6
/usr/share/man/man1/python.1.gz

Also I can see what python version I’m using:

(virtualenv-test) bash-4.1$ which python
/data/virtualenv-test/bin/python

However, after typing python, I got the following error message:

(virtualenv-test) bash-4.1$ python
python: error while loading shared libraries: libpython3.4m.so.1.0: cannot open shared object file: No such file or directory

What can be the underlying reason?

pythonpython-3.xvirtualenv
  • 1 1 Answer
  • 9 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    1 Answer

    • Voted
    1. Rohit Patel

      Rohit Patel

      • 0 Questions
      • 98 Answers
      • 0 Best Answers
      • 0 Points
      View Profile
      Best Answer
      Rohit Patel
      2020-12-11T20:35:26+00:00Added an answer on December 11, 2020 at 8:35 pm

      Try adding the python3.4’s lib path to the $LD_LIBRARY_PATH environment variable.

      First find out the lib path of python3.4 (depends on how you installed python3.4)

      For me it was: /opt/python361/lib, then add it to environment variable like so:

      export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/python361/lib
      

      P.S.
      I came across a similar problem while using virtualenv with python3.6, and I fixed it like so:

      • First, append include <lib path of python3.x> to /etc/ld.so.conf (Something like: include /opt/python361/lib or include /usr/local/lib)
      • Then, activate the new configuration by running sudo /sbin/ldconfig -v.
      • 4
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    You must login to add an answer.

    Forgot Password?

    Sidebar

    Ask A Question
    • Popular
    • Kenil Vasani

      SyntaxError: invalid syntax to repo init in the AOSP code

      • 5 Answers
    • Kenil Vasani

      xlrd.biffh.XLRDError: Excel xlsx file; not supported

      • 3 Answers
    • Kenil Vasani

      Homebrew fails on MacOS Big Sur

      • 3 Answers
    • Kenil Vasani

      runtimeError: package fails to pass a sanity check for numpy ...

      • 3 Answers
    • Kenil Vasani

      ERROR: torch has an invalid wheel, .dist-info directory not found

      • 2 Answers

    Explore

    • Most Answered
    • Most Visited
    • Most Voted
    • Random

    © 2020-2021 ErrorCorner. All Rights Reserved
    by ErrorCorner.com