Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anaconda ImportError: libSM.so.6: cannot open shared object file: No such file or directory

Here's my python import statements

import plotly as py
import pandas as pd
import numpy as np

import plotly.plotly as py
import plotly.tools as plotly_tools
from plotly.graph_objs import *

os.environ['MPLCONFIGDIR'] = tempfile.mkdtemp()
from matplotlib.finance import quotes_historical_yahoo
import matplotlib.pyplot as plt

from scipy.stats import gaussian_kde

from IPython.display import HTML

It throws and ImportError ImportError: libSM.so.6: cannot open shared object file: No such file or directory

I know there is problem with this import statement import matplotlib.pyplot as plt

like image 444
CodeNinja101 Avatar asked Sep 04 '15 03:09

CodeNinja101


2 Answers

Try this command if you are using ubuntu: pyqt4 might be missing

sudo apt-get install -y python-qt4

It worked for me.

like image 53
Ganesh Pandey Avatar answered Oct 16 '22 21:10

Ganesh Pandey


This depends on the backend you're using for matplotlib.

It appears you're on the Qt backend. To avoid installing Qt, you can change it to something native to your distribution, such as GTKAgg

like image 40
Ciprian Tomoiagă Avatar answered Oct 16 '22 22:10

Ciprian Tomoiagă