I have installed pymc using easy_install pymc command. While I try to import the package using import pymc.
I am getting following errors :
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/pymc-2.3.2-py2.7-linux-i686.egg/pymc/__init__.py", line 29, in <module>
from .CommonDeterministics import *
File "/usr/local/lib/python2.7/dist-packages/pymc-2.3.2-py2.7-linux-i686.egg/pymc/CommonDeterministics.py", line 21, in <module>
from .utils import safe_len, stukel_logit, stukel_invlogit, logit, invlogit, value, find_element
File "/usr/local/lib/python2.7/dist-packages/pymc-2.3.2-py2.7-linux-i686.egg/pymc/utils.py", line 14, in <module>
from . import flib
ImportError: libatlas.so.3gf: cannot open shared object file: No such file or directory
I am using Ubuntu 12.04 and Python 2.7.
What is the reason for these errors?
Try installing that missing library:
apt-get install libatlas3-base-dev
Related
I am trying to use the "statsmodels" package. When I try to import the package using this command:
import statsmodels
it works perfectly but when I tried to run the following comand in Python 2:
from statsmodels.distributions.empirical_distribution import ECDF
I will get the following error:
Traceback (most recent call last):
File "circleseq/circleseq.py", line 16, in <module>
import findCleavageSites
File "/mnt/data/users/S.Sie/circleseq/circleseq-master/circleseq/findCleavageSites.py", line 8, in <module>
from statsmodels.distributions.empirical_distribution import ECDF
File "/usr/lib64/python2.7/site-packages/statsmodels/distributions/__init__.py", line 1, in <module>
from statsmodels.tools._testing import PytestTester
File "/usr/lib64/python2.7/site-packages/statsmodels/tools/__init__.py", line 1, in <module>
from .tools import add_constant, categorical
File "/usr/lib64/python2.7/site-packages/statsmodels/tools/tools.py", line 8, in <module>
from statsmodels.compat.python import lzip, lmap
File "/usr/lib64/python2.7/site-packages/statsmodels/compat/__init__.py", line 1, in <module>
from statsmodels.tools._testing import PytestTester
File "/usr/lib64/python2.7/site-packages/statsmodels/tools/_testing.py", line 11, in <module>
from statsmodels.compat.pandas import assert_equal
File "/usr/lib64/python2.7/site-packages/statsmodels/compat/pandas.py", line 4, in <module>
import numpy as np
File "/usr/lib64/python2.7/site-packages/statsmodels/compat/numpy.py", line 46, in <module>
NP_LT_114 = LooseVersion(np.__version__) < LooseVersion('1.14')
AttributeError: 'module' object has no attribute '__version__'
I have to work with Python 2 since the tool I am using is in Python 2. How I can fix the issue?
Since you only work on Python 2, is it possible to rollback statsmodels where it was compatible to Python 2? You may lost some features, but you can check yourself if the older version is enough to fill in your requirements.
To rollback to an older version of a package, you can add the -I flag to your pip install.
pip install -I <package>==<version>
I am trying to plot with geopandas with this [tutorial][1]. However, whenever I run this: I find following errors:
Traceback (most recent call last):
File "/home/mahin/PycharmProjects/ProfessorEick-20191013T041703Z-001/ProfessorEick/KernelDensity2D/GeoPandasPlot.py", line 2, in <module>
import geoplot
File "/home/mahin/miniconda3/lib/python3.7/site-packages/geoplot/__init__.py", line 1, in <module>
from .geoplot import (
File "/home/mahin/miniconda3/lib/python3.7/site-packages/geoplot/geoplot.py", line 17, in <module>
import contextily as ctx
File "/home/mahin/miniconda3/lib/python3.7/site-packages/contextily/__init__.py", line 7, in <module>
from .place import Place, plot_map
File "/home/mahin/miniconda3/lib/python3.7/site-packages/contextily/place.py", line 6, in <module>
from .tile import howmany, bounds2raster, bounds2img, _sm2ll, _calculate_zoom
File "/home/mahin/miniconda3/lib/python3.7/site-packages/contextily/tile.py", line 20, in <module>
from rasterio.io import MemoryFile
ModuleNotFoundError: No module named 'rasterio.io'
I have tried installing rasterio using conda from the following link and also using the following instructions. However, the problem still exists. Anybody knows what could be the reason? My operating system is Ubuntu 18.06, I am running the code using pyccharm and my python version is 3.7.
I have installed pouchdb and PyQt5 using pip . When i try to
import pouchdb
I get the following error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\ProgramData\Anaconda33\lib\site-packages\pouchdb\__init__.py", line 88, in <module>
from pouchdb import context
File "C:\ProgramData\Anaconda33\lib\site-packages\pouchdb\context.py", line 73, in <module>
class Page(QtWebKitWidgets.QWebPage):
NameError: name 'QtWebKitWidgets' is not defined
What do i do to install pouchdb properly ?
You may have installed python-pyqt5.qtwebkit, when you actually needed to download python3-pyqt5.qtwebkit
This is what solved the issue for me
I can import mingus but sublibraries such as mingus.extra.lilypond give me an error:
import mingus.core.notes
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
import mingus.core.notes
File "C:\Users\PharaohZz\AppData\Local\Programs\Python\Python36\lib\site-packages\mingus\core\notes.py", line 29, in <module>
from mt_exceptions import NoteFormatError, RangeError, FormatError
ModuleNotFoundError: No module named 'mt_exceptions'
or
import mingus.extra.lilypond
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import mingus.extra.lilypond
File "C:\Users\PharaohZz\AppData\Local\Programs\Python\Python36\lib\site-packages\mingus\extra\__init__.py", line 20, in <module>
import lilypond
ModuleNotFoundError: No module named 'lilypond'
You can fix this problem by first uninstalling mingus (pip uninstall mingus).
Then build the library from it's source. To do this:
Download the files from git hub using the command git clone https://github.com/bspaans/python-mingus .
Enter the directory using cd python-mingus.
Finally install it using the command python setup.py install.
This fixed the problem for me.
Tried anaconda today , it seems fine but when I tried to launch Spyder each time I get this error: Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\Scripts\spyder-script.py", line 6, in <module>
from spyder.app.start import main
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\app\start.py", line 23, in <module>
from spyder.utils.external import lockfile
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\external\lockfile.py", line 22, in <module>
import psutil
File "C:\Users\Jaker\AppData\Roaming\Python\Python36\site-packages\psutil\__init__.py", line 126, in <module>
from . import _pswindows as _psplatform
File "C:\Users\Jaker\AppData\Roaming\Python\Python36\site-packages\psutil\_pswindows.py", line 16, in <module>
from . import _psutil_windows as cext
ImportError: cannot import name '_psutil_windows'
Any help regarding this ? Also how do I get python 3.6.3 in anaconda..?
The problem is you have two Python versions installed in your system: one in C:\ProgramData\Anaconda3\ and the other in C:\Users\Jaker\AppData\Roaming\Python\Python36.
Please uninstall one of them and the problem will be solved.