kuanb / peartree

peartree: A library for converting transit data into a directed graph for sketch network analysis.
MIT License
201 stars 23 forks source link

ImportError: DLL load failed: The specified procedure could not be found. #125

Closed DJN1 closed 5 years ago

DJN1 commented 5 years ago

So after countless of hours trying to install peartree, I finally managed to install it. The problem was installing Fiona, which I ended up installing with the provided whl for python 3.7. I tried to just import peartree to see if it installed successfully and I got the following error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
 in 
      3 get_ipython().run_line_magic('matplotlib', 'inline')
      4 
----> 5 import peartree as pt

~\AppData\Local\Programs\Python\Python37\lib\site-packages\peartree\__init__.py in 
      1 from . import graph_tool  # noqa: F401
----> 2 from . import parallel  # noqa: F401
      3 
      4 from peartree.__version__ import __version__  # noqa: F401
      5 from peartree.paths import (

~\AppData\Local\Programs\Python\Python37\lib\site-packages\peartree\parallel.py in 
      4 import numpy as np
      5 import pandas as pd
----> 6 from peartree.toolkit import nan_helper
      7 from peartree.utilities import log
      8 

~\AppData\Local\Programs\Python\Python37\lib\site-packages\peartree\toolkit.py in 
      4 import warnings
      5 
----> 6 import geopandas as gpd
      7 import networkx as nx
      8 import numpy as np

~\AppData\Local\Programs\Python\Python37\lib\site-packages\geopandas\__init__.py in 
      2 from geopandas.geodataframe import GeoDataFrame
      3 
----> 4 from geopandas.io.file import read_file
      5 from geopandas.io.sql import read_postgis
      6 from geopandas.tools import sjoin

~\AppData\Local\Programs\Python\Python37\lib\site-packages\geopandas\io\file.py in 
      1 import os
      2 
----> 3 import fiona
      4 import numpy as np
      5 import six

~\AppData\Local\Programs\Python\Python37\lib\site-packages\fiona\__init__.py in 
     85     pass
     86 
---> 87 from fiona.collection import BytesCollection, Collection
     88 from fiona.drvsupport import supported_drivers
     89 from fiona.env import ensure_env_with_credentials, Env

~\AppData\Local\Programs\Python\Python37\lib\site-packages\fiona\collection.py in 
      7 
      8 from fiona import compat, vfs
----> 9 from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
     10 from fiona.ogrext import Session, WritingSession
     11 from fiona.ogrext import buffer_to_virtual_file, remove_virtual_file, GEOMETRY_TYPES

ImportError: DLL load failed: The specified procedure could not be found.

I tried installing peartree again, and then it failed due to Fiona again.

Thanks ahead of time, David

kuanb commented 5 years ago

Thanks David.

So, you're problem is actually that there's issues with support for Py 3.7 for many of peartree's dependencies right now.

Specifically for Fiona, this issue seems to arise with frequency: https://github.com/Toblerity/Fiona/issues?utf8=%E2%9C%93&q=is%3Aissue+DLL+load+failed+

I would recommend following patterns from those issues on the Fiona repo.

Another option might be to switch you version of python being used to 3.6 for now just to get everything up and running in your environment.

If you want to bypass the complexity of installing all the dependencies for peartree, I would recommend using the docker image available that contains everything you need to get up and running with a Jupyter notebook container with working dependencies, graph-tool, etc.

kuanb commented 5 years ago

Circling back to see if any of the suggestions worked, @DJN1. Let me know if I can assist any further.

kuanb commented 5 years ago

Closing as the observed issues appear to be related to installing peartree dependencies, such as Fiona, and there has been no activity on this issue for about a week.