Successfully installed georasters but unable to import - python-2.7

Not able to solve.Kindly clarify.
I had installed georasters then it gave error with numpy ,now numpy is solved it is giving error with fiona.
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import georasters
File "D:\Python\lib\site-packages\georasters\__init__.py", line 3, in <module>
from .georasters import get_geo_info, map_pixel, map_pixel_inv, aggregate, create_geotiff, align_rasters, \
File "D:\Python\lib\site-packages\georasters\georasters.py", line 38, in <module>
from fiona.crs import from_string
File "D:\Python\lib\site-packages\fiona\__init__.py", line 77, in <module>
from fiona.collection import Collection, BytesCollection, vsi_path
File "D:\Python\lib\site-packages\fiona\collection.py", line 7, in <module>
from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
ImportError: DLL load failed: The specified module could not be found.

Having same issue.
Just install fiona and geopandas.
pip install fiona geopandas

Related

Getting "No module named queue" when installing tensorflow

I am using Anaconda and trying to install tensorflow with pip, but I receive the following error and I am not sure what to do next?
Traceback (most recent call last):
File "/home/xieyangyang/anaconda3/envs/tensorflow1/bin/pip", line 7, in <module>
from pip._internal import main
File "/home/xieyangyang/anaconda3/envs/tensorflow1/lib/python2.7/site-packages/pip/_internal/__init__.py", line 20, in <module>
from pip._vendor.urllib3.exceptions import DependencyWarning
File "/home/xieyangyang/anaconda3/envs/tensorflow1/lib/python2.7/site-packages/pip/_vendor/urllib3/__init__.py", line 8, in <module>
from .connectionpool import (
File "/home/xieyangyang/anaconda3/envs/tensorflow1/lib/python2.7/site-packages/pip/_vendor/urllib3/connectionpool.py", line 44, in <module>
from .util.queue import LifoQueue
ImportError: No module named queue
Maybe just reinstall pip without pip?
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
See https://pip.pypa.io/en/stable/installing/ for more info.

ImportError: libblas.so.3

After installation of turicreate, when I am importing it
import turicreate
I am getting the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/papun/anaconda2/lib/python2.7/site-packages/turicreate/__init__.py", line 19, in <module>
from turicreate.data_structures.sgraph import Vertex, Edge
File "/home/papun/anaconda2/lib/python2.7/site-packages/turicreate/data_structures/__init__.py", line 18, in <module>
from . import sframe
File "/home/papun/anaconda2/lib/python2.7/site-packages/turicreate/data_structures/sframe.py", line 16, in <module>
from ..connect import main as glconnect
File "/home/papun/anaconda2/lib/python2.7/site-packages/turicreate/connect/main.py", line 13, in <module>
from ..cython.cy_unity import UnityGlobalProxy
ImportError: libblas.so.3: cannot open shared object file: No such file or directory
It will helpful, if I can get a suggestion on this. I have also tried
re installing scipy.
You need to install Blas.
Follow instruction details in this blog: libblas and liblapack issues and speed, with SciPy and Ubuntu

Trouble creating a conda enviroment with numpy 10.1.2

I'm having trouble getting numpy working with conda + python 2.7. It works fine with python 3, but when I try below I get "cannot import name scalarmath".
conda create -n test numpy python=2.7 --no-default-packages
source activate test
python -c 'import numpy'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/me/anaconda/envs/test/lib/python2.7/site-packages/numpy/__init__.py", line 153, in <module>
from . import add_newdocs
File "/Users/me/anaconda/envs/test/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/Users/me/anaconda/envs/test/lib/python2.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
from .type_check import *
File "/Users/me/anaconda/envs/test/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "/Users/me/anaconda/envs/test/lib/python2.7/site-packages/numpy/core/__init__.py", line 20, in <module>
from . import scalarmath
ImportError: cannot import name scalarmath
You need to activate your environment with source activate test. This works for me on OS X 10.9.:
conda create -n test numpy python=2.7 --no-default-packages
source activate test
python -c 'import numpy'

conda update --all = "ImportError: DLL load failed: %1 is not a valid Win32 application." when trying to import matplotlib.pyplot

I use the Python distribution. Python 2.7 x64 with Windows 7 SP1 x64 Ultimate.
After a conda update --all, whenever I try to import matplotlib.pyplot I get ImportError: DLL load failed: %1 is not a valid Win32 application.. Why?
Full error stack:
Traceback (most recent call last):
File "C:\svn\hw4\code\test_con.py", line 1, in <module>
import matplotlib.pyplot as plt
File "C:\Anaconda\lib\site-packages\matplotlib\pyplot.py", line 109, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "C:\Anaconda\lib\site-packages\matplotlib\backends\__init__.py", line 32, in pylab_setup
globals(),locals(),[backend_name],0)
File "C:\Anaconda\lib\site-packages\matplotlib\backends\backend_qt4agg.py", line 17, in <module>
from .backend_qt5agg import NavigationToolbar2QTAgg
File "C:\Anaconda\lib\site-packages\matplotlib\backends\backend_qt5agg.py", line 18, in <module>
from .backend_qt5 import QtCore
File "C:\Anaconda\lib\site-packages\matplotlib\backends\backend_qt5.py", line 31, in <module>
from .qt_compat import QtCore, QtGui, QtWidgets, _getSaveFileName, __version__
File "C:\Anaconda\lib\site-packages\matplotlib\backends\qt_compat.py", line 91, in <module>
from PyQt4 import QtCore, QtGui
ImportError: DLL load failed: %1 is not a valid Win32 application.
I had the same issue after running conda update anaconda. The solution that worked for me was to simply to download the latest windows installer, then uninstall and reinstall.
I suspect this is related to the pathname of your conda environment, as if you do a clean install anaconda now wants to live in C:\Users\yourname\AppData\Local\Continuum\Anaconda2, where previously it was just Anaconda (no 2). I suspect after running the upgrade scripts some things are pointing to the nonexistant (for you) "new" path.
I found that if I explicitly activate a conda environment with activate myenvname before running anything it works fine. Likewise if you you run from the "anaconda prompt" (which activates your default environment for you) it works fine. But to get my default environment to stay active from anywhere like its supposed to I had to reinstall.
Here is what worked for me:
Run conda update -f matplotlib (from the Anaconda command prompt)
This gave me a new error:
RuntimeError: module compiled against API version a but this version of numpy is 9
Traceback (most recent call last):
File "C:\svn\hw4\code\test_con.py", line 1, in <module>
import matplotlib.pyplot
File "C:\Anaconda\lib\site-packages\matplotlib\pyplot.py", line 27, in <module>
import matplotlib.colorbar
File "C:\Anaconda\lib\site-packages\matplotlib\colorbar.py", line 32, in <module>
import matplotlib.artist as martist
File "C:\Anaconda\lib\site-packages\matplotlib\artist.py", line 12, in <module>
from .transforms import Bbox, IdentityTransform, TransformedBbox, \
File "C:\Anaconda\lib\site-packages\matplotlib\transforms.py", line 39, in <module>
from matplotlib._path import (affine_transform, count_bboxes_overlapping_bbox,
ImportError: numpy.core.multiarray failed to import
Run conda update -f numpy
This gave me a new error:
Traceback (most recent call last):
File "C:\svn\hw4\code\test_con.py", line 1, in <module>
import matplotlib.pyplot
File "C:\Anaconda\lib\site-packages\matplotlib\pyplot.py", line 27, in <module>
import matplotlib.colorbar
File "C:\Anaconda\lib\site-packages\matplotlib\colorbar.py", line 34, in <module>
import matplotlib.collections as collections
File "C:\Anaconda\lib\site-packages\matplotlib\collections.py", line 27, in <module>
import matplotlib.backend_bases as backend_bases
File "C:\Anaconda\lib\site-packages\matplotlib\backend_bases.py", line 56, in <module>
import matplotlib.textpath as textpath
File "C:\Anaconda\lib\site-packages\matplotlib\textpath.py", line 22, in <module>
from matplotlib.mathtext import MathTextParser
File "C:\Anaconda\lib\site-packages\matplotlib\mathtext.py", line 63, in <module>
import matplotlib._png as _png
ImportError: DLL load failed: The specified module could not be found.
Run conda install anaconda. This rolled your system back to a stable anaconda distribtution, and solved the issue. (I guess you could skip steps 1 and 2, but I don't feel like going through it again to confirm…)

python script and libGLEW related error (menpo.io API)

I am writing a python script in Ubuntu 14.04 that imports the menpo.io (API for deformable models) that results in the following error:
Traceback (most recent call last):
File "/home/Dropbox/pyFaceDepression/AAM_Menpo_final.py", line 1, in <module>
import menpo.io as mio
File "/home/miniconda/envs/menpo/lib/python2.7/site-packages/menpo/__init__.py", line 7, in <module>
import io
File "/home/miniconda/envs/menpo/lib/python2.7/site-packages/menpo/io/__init__.py", line 1, in <module>
from base import (import_auto, import_image, import_images,
File "/home/miniconda/envs/menpo/lib/python2.7/site-packages/menpo/io/base.py", line 815, in <module>
from menpo.io.extensions import (mesh_types, all_image_types,
File "/home/miniconda/envs/menpo/lib/python2.7/site-packages/menpo/io/extensions.py", line 2, in <module>
from menpo.io.landmark import (LM3Importer, LANImporter, LM2Importer,
File "/home/miniconda/envs/menpo/lib/python2.7/site-packages/menpo/io/landmark.py", line 9, in <module>
from menpo.shape import PointCloud
File "/home/miniconda/envs/menpo/lib/python2.7/site-packages/menpo/shape/__init__.py", line 2, in <module>
from menpo.shape.mesh import TriMesh, ColouredTriMesh, TexturedTriMesh
File "/home/miniconda/envs/menpo/lib/python2.7/site-packages/menpo/shape/mesh/__init__.py", line 2, in <module>
from .coloured import ColouredTriMesh
File "/home/miniconda/envs/menpo/lib/python2.7/site-packages/menpo/shape/mesh/coloured.py", line 3, in <module>
from menpo.rasterize import Rasterizable
File "/home/miniconda/envs/menpo/lib/python2.7/site-packages/menpo/rasterize/__init__.py", line 2, in <module>
from menpo.rasterize.opengl import GLRasterizer
File "/home/miniconda/envs/menpo/lib/python2.7/site-packages/menpo/rasterize/opengl.py", line 2, in <module>
from cyrasterize.base import CyRasterizerBase
File "/home/miniconda/envs/menpo/lib/python2.7/site-packages/cyrasterize/__init__.py", line 1, in <module>
from cyrasterize.base import CyRasterizer
File "/home/miniconda/envs/menpo/lib/python2.7/site-packages/cyrasterize/base.py", line 3, in <module>
from cyrasterize.glrasterizer import GLRasterizer
ImportError: libGLEW.so.#glew_version#: cannot open shared object file: No such file or directory
The library I import is called Menpo.io
Any ideas how to fix this ?
I have to apologise, this is actually totally my fault as I was trying to update some of our build scripts and accidentally released a broken build of GLEW. To fix this, you can run:
conda install -c menpo --force glew=1.10.0
Which should download and reinstall GLEW and hopefully fix this problem.
Please reply back if you have any problems at all!