Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/339.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 无法使用Flask和Shapely在heroku上运行应用程序_Python_Heroku_Flask_Shapely - Fatal编程技术网

Python 无法使用Flask和Shapely在heroku上运行应用程序

Python 无法使用Flask和Shapely在heroku上运行应用程序,python,heroku,flask,shapely,Python,Heroku,Flask,Shapely,我开发了一个需要Shapely python库的小应用程序。我通过.exe文件在windows上安装了它,因此它会自动将必要的DLL文件(geos.DLL、geos_c.DLL)放入Python27\Lib\site packages\shapely\DLL中 当我试图在我的机器上创建virtualenv时,我通过pip安装了shapely,但它没有放置这些DLL文件,因此我出现了以下错误: from shapely.geos import lgeos File "...\lib\site-pa

我开发了一个需要Shapely python库的小应用程序。我通过.exe文件在windows上安装了它,因此它会自动将必要的DLL文件(geos.DLL、geos_c.DLL)放入Python27\Lib\site packages\shapely\DLL中

当我试图在我的机器上创建virtualenv时,我通过pip安装了shapely,但它没有放置这些DLL文件,因此我出现了以下错误:

from shapely.geos import lgeos
File "...\lib\site-packages\shapely\geos.py", line 71, in <module>
_lgeos = CDLL("geos.dll")
File "C:\Python27\Lib\ctypes\__init__.py", line 353, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found
但该应用程序仍因同样的错误而崩溃


有人能帮我解决这个问题吗?

Heroku使用*nix系统-它使用的是*.so类型库而不是*.dll

因此,删除所有环境变量和dll

我通过pip安装

pip install shapely
从安装失败

#Copy Shapely DLL Files to Site packages
cp -r $HOME/env_files/DLLs $HOME/.heroku/python/lib/python2.7/site-packages/shapely/
pip install shapely