Azure / azure-functions-core-tools

Command line tools for Azure Functions
MIT License
1.33k stars 437 forks source link

Publish Azure Function App fails on 2.0.1-beta.38 #719

Closed asavaritayal closed 6 years ago

asavaritayal commented 6 years ago

From @priyaananthasankar on September 13, 2018 20:1

Attached requirements.txt. Noticed the following error.

There was an error restoring dependencies.ERROR: ['pip', 'download', '-r', '/Users/prananth/Projects/FunctioningPython/Gutenberg/TrainBook/requirements.txt', '--dest', '/var/folders/8_/8m4c263132g8fwq0ql816zkw0000gn/T/azureworker9pk49gcc'] failed with exit code 1

requirements.txt

The app works fine locally.

Copied from original issue: Azure/azure-functions-python-worker#196

asavaritayal commented 6 years ago

@elprans can you please investigate this issue?

asavaritayal commented 6 years ago

From @elprans on September 13, 2018 20:14

Your requirements.txt contains a package which is not on PyPI:

  Could not find a version that satisfies the requirement en-core-web-sm==2.0.0 (from -r requirements.txt (line 21)) (from versions: )
No matching distribution found for en-core-web-sm==2.0.0 (from -r requirements.txt (line 21))
asavaritayal commented 6 years ago

From @priyaananthasankar on September 13, 2018 20:17

Great! Is there a way to find out which don't exist on PyPI? I think can send out requests to PyPI interface. I can write this part.

Removed en-core-web-sm and it still fails. Also it would be great if a better error message gets thrown out.

asavaritayal commented 6 years ago

From @elprans on September 13, 2018 20:34

@ahmelsayed Is there a CLI mode which runs packapp with --verbose?

@priyaananthasankar There are multiple reasons why dependency resolution might fail. Making extra requests to pypi is not necessary, we just need to show better diagnostics.

asavaritayal commented 6 years ago

From @priyaananthasankar on September 13, 2018 20:39

@elprans Removed en-core-web-sm. Checked if all other packages are in PyPI. Still fails.

asavaritayal commented 6 years ago

From @elprans on September 13, 2018 20:49

@priyaananthasankar

ERROR: cannot install wrapt-1.10.11 dependency: binary dependencies without wheels are not supported. Use the --build-native-deps to try building the binary dependencies using a Docker container.

asavaritayal commented 6 years ago

From @priyaananthasankar on September 13, 2018 20:57

So sending requests to PyPI doesn't ensure there are wheels. It gave me 200 ok for wrapt. Removed wrapt and still received the same error.

asavaritayal commented 6 years ago

From @priyaananthasankar on September 13, 2018 21:16

There was an error restoring dependencies.ERROR: ['pip', 'download', '-r', '/Users/prananth/Projects/FunctioningPython/Gutenberg/TrainBook/requirements.txt', '--dest', '/var/folders/8_/8m4c263132g8fwq0ql816zkw0000gn/T/azureworker9pk49gcc'] failed with exit code

asavaritayal commented 6 years ago

From @priyaananthasankar on September 13, 2018 22:50

Tried deploying with --build-native-deps: Fails. Works fine locally!

Command "/home/site/wwwroot/worker_venv/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-k96eir8q/spacy/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-pnz5q8lu-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/site/wwwroot/worker_venv/include/site/python3.6/spacy" failed with error code -9 in /tmp/pip-build-k96eir8q/spacy/

Minimized requirements.txt to these:

azure-functions==1.0.0a4 azure-functions-worker==1.0.0a4 grpcio==1.14.2 grpcio-tools==1.14.2 protobuf==3.6.1 six==1.11.0 spacy==2.0.12 nltk==3.3 gensim==3.5.0 azure-storage==0.36.0

asavaritayal commented 6 years ago

From @priyaananthasankar on September 13, 2018 23:28

Using azure-storage is causing issues, check out this link talking about cryptography library - https://github.com/Azure/azure-storage-python/issues/219 . Azure Storage library depends on cryptography and with both build-native-deps and without it, the publish fails.

priyaananthasankar commented 6 years ago

This smaller set of files can repro the issue:

azure-functions==1.0.0a4 azure-functions-worker==1.0.0a4 grpcio==1.14.2 grpcio-tools==1.14.2 protobuf==3.6.1 six==1.11.0 nltk==3.3 gensim==3.5.0 azure-storage-blob==1.3.1 pyLDAvis==2.1.2

ahmelsayed commented 6 years ago

This should be fixed now.