# Python dependencies

**URL:** <https://answers.netlify.com/t/python-dependencies/75441>\
**Category:** Support\
**Tags:** netlify-newbie\
**Created:** [September 13, 2022, 10:38am UTC](https://answers.netlify.com/t/python-dependencies/75441 "2022-09-13T10:38:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebgd](https://avatars.discourse-cdn.com/v4/letter/e/3bc359/32.png) [@ebgd](https://answers.netlify.com/u/ebgd)\
**Post date:** [September 13, 2022, 10:38am UTC](https://answers.netlify.com/t/python-dependencies/75441/1 "2022-09-13T10:38:23Z")

</div>

I have a node.js project, with html, js, and python files  
The python files need their dependencies  
When I want to send the site to the Netlify server, I make a npm run build  
That makes the build directory which contains the requirements.txt files  
(one line of this file is for example : websocket-client==0.57.0)

Then I upload the whole build directory to Netlify server, on which I added the following environments variables  
NETLIFY\_BUILD\_DEBUG = true  
PYTHON\_VERSION = 3.8

The result is :  
12:14:45 PM: Creating deploy upload records  
12:14:46 PM: Starting post processing  
12:14:46 PM: Post processing - HTML  
12:14:46 PM: Post processing - header rules  
12:14:46 PM: Post processing - redirect rules  
12:14:46 PM: Post processing done  
12:14:50 PM: Site is live ✨

So the requirements.txt seems skipped (may be ?)  
And the site has that error :  
Error 404 means that Python module websocket was not found at url [https://bright-dango-46b445.netlify.app/websocket.py](https://bright-dango-46b445.netlify.app/websocket.py)

Note : websocket.py is not in my site files, it is a python dependency that I declared in the requirements.txt, without success

Thank you for the help

---

<div class="post-metadata">

**Author:** ![hrishikesh](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hrishikesh/32/74607_2.png) [@hrishikesh](https://answers.netlify.com/u/hrishikesh)\
**Post date:** [September 18, 2022, 1:21pm UTC](https://answers.netlify.com/t/python-dependencies/75441/2 "2022-09-18T13:21:36Z")

</div>

Before we get to the solution, I’m not understanding the reason of you trying to do this. What are you planning to achieve by uploading Python dependencies to Netlify?

---

<div class="post-metadata">

**Author:** ![ebgd](https://avatars.discourse-cdn.com/v4/letter/e/3bc359/32.png) [@ebgd](https://answers.netlify.com/u/ebgd)\
**Post date:** [September 18, 2022, 1:49pm UTC](https://answers.netlify.com/t/python-dependencies/75441/3 "2022-09-18T13:49:49Z")

</div>

Because my Python files use those dependencies  
For example websocket.  
I have to “pip install websocket-client” on my pc console to get it in my code  
How can I get it in my netlify server ?  
(I tried to do through repuirements.txt with no success)

---

<div class="post-metadata">

**Author:** ![hrishikesh](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hrishikesh/32/74607_2.png) [@hrishikesh](https://answers.netlify.com/u/hrishikesh)\
**Post date:** [September 18, 2022, 1:50pm UTC](https://answers.netlify.com/t/python-dependencies/75441/4 "2022-09-18T13:50:33Z")

</div>

But Netlify is not supposed to run Python on the server - we only serve static files.

---

<div class="post-metadata">

**Author:** ![ebgd](https://avatars.discourse-cdn.com/v4/letter/e/3bc359/32.png) [@ebgd](https://answers.netlify.com/u/ebgd)\
**Post date:** [September 18, 2022, 2:10pm UTC](https://answers.netlify.com/t/python-dependencies/75441/5 "2022-09-18T14:10:27Z")

</div>

Yet I found that thread , showing that netlify support python :

 ![2022-09-18_16-08-02](https://global.discourse-cdn.com/netlify/original/3X/b/1/b1dec58645b48b709b7ff1022e24b2b0eb6cc8e9.jpeg)

---

<div class="post-metadata">

**Author:** ![hrishikesh](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hrishikesh/32/74607_2.png) [@hrishikesh](https://answers.netlify.com/u/hrishikesh)\
**Post date:** [September 18, 2022, 2:11pm UTC](https://answers.netlify.com/t/python-dependencies/75441/6 "2022-09-18T14:11:20Z")

</div>

Python is supported to build sites, not to do any kind of server-side processing.
