Custom python package installation #4393
Replies: 2 comments
-
|
I'm interested in this feature as well, Dify would be so much more useful if we are allowed to install additional python packages to run in the code block |
Beta Was this translation helpful? Give feedback.
-
|
Little late but I found what you need: Warning This only works if you are on a selfhosted instance. You can not add custom packages if you are using cloud.dify.ai In my case I am on a docker based deployment: https://docs.dify.ai/en/self-host/quick-start/docker-compose Steps
dify-client==0.1.10Warning Libs like numpy need extra SYSCALLS permissions that you need to specify. This is mentioned by the lead maintainer in this discussion: #8200 (comment) Warning The default Sanbox Python version is 3.10.17. import sys
def main():
return {
"version": sys.version
}Note Here you can find out what dependencies the dify sandbox already installs for you: Currently these are:
sudo docker restart docker-sandbox-1
docker ps -a | grep -e sandbox -e "CONTAINER ID"
docker compose logs --tail=300 sandboxYou want to have the following line in the logs:
Where do I have this information from? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
1. Is this request related to a challenge you're experiencing?
i have to run a separate python endpoint since dify doesn't has the ability
2. Describe the feature you'd like to see
i just need an option to enter the pip package name and it should be installed in the backend to use in code node
3. How will this feature improve your workflow or experience?
this will improve the overall user experience and reduce lot of manual work
4. Additional context or comments
No response
5. Can you help us with this feature?
Beta Was this translation helpful? Give feedback.
All reactions