-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pip Install Missing Core Files #1656
Comments
This is very unlikely to be an issue with Nengo, since we use the standard |
So in our requirements.txt file we have the following line: This version of nengolib should install nengo version 2.8.0. I also tried explicitly adding nengo==2.8.0 to my requirements.txt and I got the same issue. When I pip install nengo/nengolib locally I get all of the expected python files installed and am able to reference them as you would expect. It is only when I deploy Microsoft's Azure Function platform where we get this weird error. Weirdly enough, I actually tried one of Microsoft's other supported platforms (Azure App Services) and I did not encounter this issue. Everything worked as expected. So this issue does seem to be related very specifically for Azure Functions. Also, we are not installing it from git. I believe we should be installing from PyPi. I've also included a screenshot below of nengo and nengolib that are in the site-packages. |
In the Nengo 2.8.0 wheel are three folders: nengo, nengo-2.8.0.data (containing the single file data/nengo/nengorc), and nengo-2.8.0.dist-info. It seems that for some reason the content of nengo-2.8.0.data/data overwrites nengo. Maybe it is possible to force installation from the source .tar.gz instead of the wheel? No idea whether that would work around the issue. btw: Is it possible to find out the exact pip version used by Azure Functions? |
Describe the bug
So we are trying to deploy our python code to MS Azure's Function Platform.
When we do a pip install on our local machine using our requirements.txt file nengo installs successfully and we have no issues.
But when we try and deploy to our Azure Function the deployment framework says that it successfully pip installed nengo. But when we look at the package that was actually installed it seems to be missing all python files except a file named nengorc. So when we try import nengo we get a "module can't be found" error because we can't find the nengo module we are trying to import, such as connections.py
I currently have a ticket open with Microsoft and they are researching this ticket on their end. But I just wanted to open a ticket here to see if there are any reasons that can be thought off as to why a pip install of nengo would not include the core python files (such as connections.py) and instead only includes the nengorc file.
I've included a screenshot below to show us SSH'd into the VM and you can see that inside the nengo package exists only one file
To reproduce
Ultimately, the code required to reproduce this is minimal essentially try and import a module from nengo and you will get a failure.
Expected behavior
We expect that no matter where we are pip installing this module that it will install successfully.
Error message and logs
Result: Failure Exception: ImportError: cannot import name 'Connection' from 'nengo' (unknown location). Troubleshooting Guide: https://aka.ms/functions-modulenotfound Stack: File "/azure-functions-host/workers/python/3.7/LINUX/X64/azure_functions_worker/dispatcher.py", line 275, in _handle__function_load_request func_request.metadata.entry_point) File "/azure-functions-host/workers/python/3.7/LINUX/X64/azure_functions_worker/utils/wrappers.py", line 34, in call raise extend_exception_message(e, message) File "/azure-functions-host/workers/python/3.7/LINUX/X64/azure_functions_worker/utils/wrappers.py", line 32, in call return func(*args, **kwargs) File "/azure-functions-host/workers/python/3.7/LINUX/X64/azure_functions_worker/loader.py", line 76, in load_function mod = importlib.import_module(fullmodname) File "/usr/local/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 953, in _find_and_load_unlocked File "", line 219, in _call_with_frames_removed File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/home/site/wwwroot/SampleNengoSvc/init.py", line 2, in from nengo import Connection as BaseConnection
Versions
Additional context
N/A
The text was updated successfully, but these errors were encountered: