AllenDowney / ThinkStats2

Text and supporting code for Think Stats, 2nd Edition
http://allendowney.github.io/ThinkStats2/
GNU General Public License v3.0
4.03k stars 11.31k forks source link

Import Error: version `CXXABI_1.3.9' not found #92

Closed diegoquintanav closed 7 years ago

diegoquintanav commented 7 years ago

Hi. I've just forked the repo and tried to run the first code, nsfg.py. I get an error regarding something with matplotlib.

My intuition tells me that this may have alreade a solution, but I have found none. The full trace of the error is the following

diego@ubuntu:~/Documents/dev/ThinkStats2/code$ python nsfg.py 
Traceback (most recent call last):
  File "nsfg.py", line 12, in <module>
    import thinkstats2
  File "/home/diego/Documents/dev/ThinkStats2/code/thinkstats2.py", line 34, in <module>
    import thinkplot
  File "/home/diego/Documents/dev/ThinkStats2/code/thinkplot.py", line 12, in <module>
    import matplotlib.pyplot as plt
  File "/home/diego/anaconda3/lib/python3.5/site-packages/matplotlib/pyplot.py", line 29, in <module>
    import matplotlib.colorbar
  File "/home/diego/anaconda3/lib/python3.5/site-packages/matplotlib/colorbar.py", line 32, in <module>
    import matplotlib.artist as martist
  File "/home/diego/anaconda3/lib/python3.5/site-packages/matplotlib/artist.py", line 15, in <module>
    from .transforms import (Bbox, IdentityTransform, TransformedBbox,
  File "/home/diego/anaconda3/lib/python3.5/site-packages/matplotlib/transforms.py", line 39, in <module>
    from matplotlib._path import (affine_transform, count_bboxes_overlapping_bbox,
ImportError: /home/diego/anaconda3/lib/python3.5/site-packages/matplotlib/../../../libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/diego/anaconda3/lib/python3.5/site-packages/matplotlib/_path.cpython-35m-x86_64-linux-gnu.so)

If it means something, I'm using matplotlib (2.0.2) Python 3.5.4 :: Anaconda, Inc. conda 4.3.30 gcc (GCC) 4.8.5

No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.3 LTS Release: 16.04 Codename: xenial

Thanks

diegoquintanav commented 7 years ago

I managed to find a solution. It seems that a newer version of gcc is required, in particular one that contains CXXABI_1.3.9

After some reading, there are two possible solutions:

  1. One for the people without anaconda, which is somehow explained here.

  2. In my case I use Anaconda, and the problem is solved with conda install libgcc, which upgrades the current gcc compiler.

More info about this can be found here

AllenDowney commented 7 years ago

I am surprised that that was necessary, but I am glad you resolved the problem.

Regards, Allen

On Thu, Oct 19, 2017 at 9:03 PM, Diego Quintana notifications@github.com wrote:

I managed to find a solution. It seems that a newer version of gcc is required, in particular one that contains CXXABI_1.3.9

After some reading, there are two possible solutions:

1.

One for the people without anaconda, that is somehow explained here http://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.how_to_set_paths . 2.

In my case I use Anaconda, and the problem is solved running conda install libgcc, which upgrades the current gcc compiler.

More info about this can be found here https://github.com/ContinuumIO/anaconda-issues/issues/483#issuecomment-269135787

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AllenDowney/ThinkStats2/issues/92#issuecomment-338078182, or mute the thread https://github.com/notifications/unsubscribe-auth/ABy37WNhhU5Qeenzr1aiUqo6leg6wamlks5st_F3gaJpZM4P_xhe .

wasiahmad commented 6 years ago

I am facing the same issue but conda install libgcc didn't work for me.

AllenDowney commented 6 years ago

It looks like the line that's failing is

    import matplotlib.pyplot as plt

Which means that there is something wrong with your installation of matplotlib.

Try starting Python and running just that line:

$ python
>>> import matplotlib.pyplot as plt

If it fails there, then nsfg.py is not the problem.

On Tue, Apr 17, 2018 at 6:20 AM, Wasi Ahmad notifications@github.com wrote:

I am facing the same issue but conda install libgcc didn't work for me.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AllenDowney/ThinkStats2/issues/92#issuecomment-381936883, or mute the thread https://github.com/notifications/unsubscribe-auth/ABy37aF-3EmWVVnRRb9YbrhJIAw7ZvBwks5tpcHzgaJpZM4P_xhe .

Orientier7 commented 5 years ago

I solve this problem by pip uninstalling/reinstalling scipy

Saleh-Gholam-Zadeh commented 4 years ago

Typing

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/diego/anaconda3/lib/

in the terminal will solve the problem

yilunzhao commented 4 years ago

Typing

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/diego/anaconda3/lib/

in the terminal will solve the problem

Thanks! This works for me.

LetsGoFir commented 4 years ago

Typing

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/diego/anaconda3/lib/

in the terminal will solve the problem

works for me too

jzhoubu commented 4 years ago

Typing

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/diego/anaconda3/lib/

in the terminal will solve the problem

works for me too :)

euna-cho commented 3 years ago

I managed to find a solution. It seems that a newer version of gcc is required, in particular one that contains CXXABI_1.3.9

After some reading, there are two possible solutions:

  1. One for the people without anaconda, which is somehow explained here.
  2. In my case I use Anaconda, and the problem is solved with conda install libgcc, which upgrades the current gcc compiler.

More info about this can be found here

I faced error : libstdc++.so.6: version 'CXXABI_1.3.9' not found but conda install libgcc worked for me! thanks

brando90 commented 3 years ago

conda install libgcc

that didn't work for me

soodeh-nilforoushan commented 2 years ago

export LD_LIBRARY_PATH

Thanks, Work for me

k-aleksandrovich commented 2 years ago

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/diego/anaconda3/lib/

in the terminal will solve the problem

Oh thank you so much, man I've almost lost my hope