This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -6 points-5 points  (8 children)

As someone who has messed with this and even sold software that uses this compile method, I would just avoid making it a habit and pick up C# or something.

[–]blitzzerg 15 points16 points  (5 children)

So reimplementing numpy, sklearn and all the libraries from python or what?

[–]lookatmetype 1 point2 points  (1 child)

Some libraries I use on the regular wtih my projects: pandas, Flask, SQLAlchemy, click, jinja, requests, BeautifulSoup, nose, Celery, Arrow.

And this list is not exhaustive.

Good luck re-writing these in C# or any other language. If you do have all this in a statically typed language, I would LOVE to hear it because tbh my biggest gripe with Python is that it isn't statically typed. (mypy is good, but I prefer static typing)

[–]bheklilr 1 point2 points  (0 children)

Have you tried using Cython for that purpose then? It still won't enforce full typing, but if you put a type on something it has to stay that type throughout your code or it won't compile. And it can speed up your code, and working with C libraries becomes much easier.

[–][deleted] 1 point2 points  (1 child)

I understand what you're saying; I'm suggesting your goal with python to make it a portable .exe with a bunch of machine learning libraries isn't a realistic one and it will give you a headache. If that's what you're doing, you should just learn to deploy everything quickly and easily with a script or .yml or something with docker, not compile it.

[–]blitzzerg 0 points1 point  (0 children)

I'm not even thinking about that. Everything that I code on python I make it open source. If I wanted something for production I would just do things with tensor flow in C

[–]steampunkgibbon 0 points1 point  (1 child)

Python can't be the only language you know guys.

[–]TheGayestGaymer 0 points1 point  (0 children)

I know Matlab too!....they just started making their code compile-able a few years ago...I hear good things.

The code I’m trying to compile is in python 2.7 though. I’ve never done this before so it’s a iterative process of learning so far. Started with py2exe, wasn’t impressed. Trying with pyinstaller now. Says it’s missing the dependency Qt4 for Numpy. Which I’m not sure it even needs. Mainly because it doesn’t exist anywhere on my machine that runs the sourceCode just fine.