-
Notifications
You must be signed in to change notification settings - Fork 179
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
Cannot run pip during pre-build command #1370
Comments
Same here |
@dimbleby @csuriano23 Hey folks, sorry about this issue -- taking a look at what's going on here, it seems that the We're looking at ways to migrate the symlinks that are set up in the build script generated by Oryx to point to the Python 3.9.7 SDK that the For your repository @dimbleby , I see that you're using a
Out of curiosity, is there a need for you to provide the |
If Oryx supports poetry directly then that's good for me - is that documented?! Currently I am installing poetry to export a Edit to answer my own question: support for poetry is not documented. Per the link I gave when raising the issue, the description of install demands
|
By the way, I see that your script goes plain Probably |
@cormacpayne Is it possible to use the PRE_BUILD_COMMAND (or another method) to upgrade pip before Oryx installs dependencies from requirements.txt? |
@real-person Sorry for the delayed response -- for a sample Django Python application, I was able to provide the following:
Which executed the following early on in the build:
It was able to update |
turns out: not good enough. My application is a django application, and without a requirements.txt I don't hit this
(Also, if I am reading the code right, you install poetry in the same virtual environment that the application is then installed in. That's probably a mistake - what if they have conflicting requirements?) |
@cormacpayne has there been any progress/solution/workaround on this? How do i get a pip install working in the PRE_BUILD_COMMAND ? I am trying to install Cython before I get to my requirements.txt, since a package i'm installing needs Cython already there. I need this, because i am trying to install PyCocoTools straight from github in my requirements.txt using I am getting the same error Thank you! |
@cormacpayne just bumping here to see if there's been any progress on this. thanks |
The same here! In my case I need to upgrade pip and wheel before Oryx proceeds and install the dependencies from requirements.txt, otherwise I always get " ERROR: Failed building wheel for ...". |
@xK3v @riptusk331 @EPanni -- Hey folks, apologies that this issue is still affecting you; I attempted to reproduce this
|
Here's one example: Deployment log: I assume this /tmp/build-debug.log is not retained or it should have ended in above... |
Hello all, sorry for the delay in getting back to you. I believe that this issue is caused because the language-agnostic prebuild command is executed before we activate the python virtual environment. We have created a ticket on our side to introduce a new environment variable that would execute a command within the virtual environment. Please let me know if that solution does not sound like it would resolve the issue for anyone. For those who would like to execute a command outside of the virtual environment, you should be able to run pip as follows to circumvent the bad interpreter issue (providing the version of python that is used to build your project): |
Internal issue is User Story 1767404. Issue has not been addressed beyond the workaround above. |
Is there any update here? Can I upgrade pip (or change pip version) before Oryx uses it? Latest pip is not used by Oryx. If that is not possible, what combination of .deployment and deploy.sh can help me in deploying my Python code (Linux, App Service, Local Git)? I need to do the following:
Something as simple as this is not working in my case since I need to use a particular version of pip. I cannot find any documentation as to how can I do this for my configuration:
|
Bug Report
At what date and time did you most recently experience the problem?
May 1st 00:00 UTC
Where did you experience the problem? E.g. Azure Web Apps, Azure Functions, Azure Container Registry, or offline use.
Azure Web Apps
If your repo is publicly available please share its URL:
https://github.com/dimbleby/e-treasure-hunt
What happened?
prebuild script fails to run a
pip
command, claiming/opt/python/3.9.7/bin/python3.9: bad interpreter: No such file or directory
What did you expect or want to happen?
https://docs.microsoft.com/en-us/azure/app-service/configure-language-python#customize-build-automation says that:
So I expect that running a pip command should work
PRE_BUILD_COMMAND=prebuild.sh
prebuild.sh contains
The text was updated successfully, but these errors were encountered: