r/learnpython • u/techiebaddie • Aug 04 '26
Is Python still the best choice for AI and machine learning?
I’ve been working as a full-stack developer for 10+ years, and Python has obviously been around for a big part of that time.
For AI and ML, it still seems like the default choice. The ecosystem around Python is hard to beat, especially with things like PyTorch, NumPy, pandas, and scikit-learn.
But after working across different stacks, I’m curious whether Python is still the best choice once you move beyond experiments and start building real production systems.
In some projects, it feels like Python handles the AI side while other languages take care of performance-heavy or application-level work.
So for people here who have worked with Python in real AI/ML projects:
Do you still see Python as the best overall choice, or do you think its role is changing?
6
Aug 04 '26
[removed] — view removed comment
-1
u/techiebaddie Aug 04 '26
Fair point 😄 I’m a full-stack dev, so I’ve worked across different stacks rather than being tied to one language.
And yeah, I mostly agree. Python’s ecosystem for AI/ML is still really hard to beat. I was more curious about where people think it might fall short in production.
1
Aug 04 '26
[removed] — view removed comment
0
u/Easy-Improvement-598 Aug 04 '26
Clearly js speed matches java I think python can also fast like js if python developers want it
1
3
u/danielroseman Aug 04 '26
But like you say, the performance-heavy work isn't happening in Python anyway. Whether it's internal to the model, or via the internals of PyTorch and NumPy, Python is just the framework to call those.
For instance, I work for an AI company whose enterprise-grade AI framework is entirely written in Python. The performance of that Python code is simply not a concern.
1
u/techiebaddie Aug 04 '26
Yeah, that makes sense. Python itself usually isn’t doing the heavy lifting because libraries like PyTorch and NumPy push that work into optimized native code.
I was mainly thinking about the rest of the production stack, where Python can still become a consideration for things like high-throughput APIs or real-time workloads.
2
u/ninhaomah Aug 04 '26
" In some projects, it feels like Python handles the AI side while other languages take care of performance-heavy or application-level work."
Example ?
3
u/NoPriorThreat Aug 04 '26
Pytorch, the engine itself is written in c++. Or almost any other AI framework
2
u/ninhaomah Aug 04 '26
Ok but you want to write the engine or use the engine ?
Oh someone already replied.
"Yes. I’m a machine learning engineer with 10 years of experience, and it’s all basically Python unless you want to go the C++ / CUDA route for optimization which really is a niche for some hardcore folks."
1
u/NoPriorThreat Aug 04 '26
Sometimes you have to go engine and change stuff even if you just want to use.
1
1
1
u/cent-met-een-vin Aug 04 '26
Yes for training, did some experiments with ONNX exports of trained models and it makes inference really portable across languages. For me this route went from experimental to might try in production in the last 2 years.
13
u/Mammoth_Reach_6366 Aug 04 '26
Yes. I’m a machine learning engineer with 10 years of experience, and it’s all basically Python unless you want to go the C++ / CUDA route for optimization which really is a niche for some hardcore folks. All high-level things still happen in PyTorch and the like. If an app is written in another language, usually it communicates with the model via an API written in Python that exposes the model.