Попытка запустить функцию python azure из VS Code.Использование require.txt для импорта необходимых библиотекПри попытке установить Shapely == 1.6.4.post2 я получаю сообщение об ошибке, см. Ниже.
То, что я уже пробовал: запускал функцию python локально, не используя функции azure, и использовал чистую среду python - с хорошим результатом..
import datetime
import logging
from shapely.geometry import shape, Point, Polygon
import azure.functions as func
def main(mytimer: func.TimerRequest) -> None:
utc_timestamp = datetime.datetime.utcnow().replace(
tzinfo=datetime.timezone.utc).isoformat()
if mytimer.past_due:
logging.info('The timer is past due!')
logging.info('Python timer trigger function ran at %s', utc_timestamp)
Content of requirements.txt:
pip==19.1.1
Shapely==1.6.4.post2
> Executing task in folder PythonAzureFunctions: .env\Scripts\python -m pip install -r requirements.txt <
Requirement already satisfied: pip==19.1.1 in e:\onedrive-abb\onedrive - abb\work\pythonazurefunctions\.env\lib\site-packages (from -r requirements.txt (line 1)) (19.1.1)
Collecting Shapely==1.6.4.post2 (from -r requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/a2/fb/7a7af9ef7a35d16fa23b127abee272cfc483ca89029b73e92e93cdf36e6b/Shapely-1.6.4.post2.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\T\AppData\Local\Temp\pip-install-_xq0ijpu\Shapely\setup.py", line 80, in <module>
from shapely._buildcfg import geos_version_string, geos_version, \
File "C:\Users\T\AppData\Local\Temp\pip-install-_xq0ijpu\Shapely\shapely\_buildcfg.py", line 200, in <module>
lgeos = CDLL("geos_c.dll")
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\ctypes\__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Users\T\AppData\Local\Temp\pip-install-_xq0ijpu\Shapely\
The terminal process terminated with exit code: 1
Terminal will be reused by tasks, press any key to close it.