what does pip do to not suck?
from irelephant@programming.dev to python@programming.dev on 28 Apr 2025 07:23
https://programming.dev/post/29371357

I’ve been trying to get luarocks to work on windows, and all it gives is cryptic gcc errors.

How does pip manage to work on most platforms without issues?

#python

threaded - newest

nitrofurano@ciberlandia.pt on 28 Apr 2025 07:29 next collapse

@irelephant do anyone care a thing about windoze? :O

irelephant@programming.dev on 28 Apr 2025 08:06 collapse

Lack of windows support for most luarocks modules has stopped me from writing a lot of stuff in lua.

logging_strict@programming.dev on 29 Apr 2025 13:18 next collapse

Who are you writing package for?

backend stuff need not run on Windows at all.

irelephant@programming.dev on 29 Apr 2025 13:58 collapse

I was thinking of making a simple SSG (Static Site Generator), and I wanted to make it in lua.
some other cli tools, like scraping scripts as well.

logging_strict@programming.dev on 04 May 2025 07:25 collapse

So web scraping speed is at issue? I believe Python has beautifulsoup for web scrapping.

Unless it’s for a learning experience, would recommend to not reinvent the wheel. Have been there done that too many times.

I feel like the village idiot cuz not properly learning that lesson.

irelephant@programming.dev on 04 May 2025 12:00 collapse

No, speed isn’t the issue. Its installing packages/modules on windows with luarocks, the lua package manager. It doesn’t work half the time on windows.

nitrofurano@ciberlandia.pt on 30 Apr 2025 07:48 collapse

@irelephant lack of support of an "operating system" that shouldnt exist at all is actually a great thing! ;)

irelephant@programming.dev on 30 Apr 2025 09:45 collapse

most people are on windows, so if I make something, it should support that.

nitrofurano@ciberlandia.pt on 30 Apr 2025 19:59 collapse

@irelephant it reminds me what my mother used to say all the time: "its not because most people are jumping into a hole that you have to as well" xD

gigachad@sh.itjust.works on 28 Apr 2025 08:16 next collapse

pip cannot install some system dependencies your library might need. Windows is extra difficult sometimes, as the library might require some paths during installation, Linux is way easier for this kind of stuff. Either you use WSL, or you follow these instructions for Windows I found by googling github.com/…/installation_instructions_for_window…

I use Mint btw

irelephant@programming.dev on 28 Apr 2025 10:21 collapse

The instructions don’t work half the time.

Midnitte@beehaw.org on 28 Apr 2025 08:43 next collapse

I’d love to hear a technical answer, but one thing that’s probably part of it is the fact that pip is written in Python and Python runs everywhere without much problem (though uv also seems to work pretty flawlessly too lol)

irelephant@programming.dev on 28 Apr 2025 10:21 collapse

Lua runs everywhere (almost), but I cannot install a uuid library on windows.

Kissaki@programming.dev on 28 Apr 2025 13:35 collapse

IIRC I’ve had pip fail like that too. Unable to build a lib it included.

irelephant@programming.dev on 28 Apr 2025 17:00 collapse

Pip does fail sometimes, but its not half as bad as luarocks.

GissaMittJobb@lemmy.ml on 28 Apr 2025 08:53 next collapse

I’m surprised to hear you say this because in all honesty, pip really sucks as far as package managers go. uv is a worthy replacement.

irelephant@programming.dev on 28 Apr 2025 10:20 next collapse

Compared to luarocks, pip is amazing.

GissaMittJobb@lemmy.ml on 28 Apr 2025 10:51 collapse

Maybe so, but pip is years behind package managers like cargo. It really is not particularly good.

sugar_in_your_tea@sh.itjust.works on 28 Apr 2025 13:35 collapse

Sure, and Luarocks is behind pip, and it really is particularly bad.

sus@programming.dev on 28 Apr 2025 11:34 next collapse

I think this is talking about basic functionality, eg. can you do basic stuff with a clean install without everything immediately breaking

There’s a lot of programming tools that are primarily developed for and on linux, and “windows support” is an afterthought which will result in linux being a very frictionless experience but windows being a minefield of problems and requiring careful manual setup

glowing_hans@sopuli.xyz on 29 Apr 2025 22:43 collapse

Today I learned about uv-package manager ; thanks!

gid@lemmy.blahaj.zone on 28 Apr 2025 11:04 next collapse

If you’re getting gcc errors it sounds like the package you’re trying to install contains some c/c++ stuff that needs compiling.

A lot of python packages that rely on things written in c/c++ ship those precompiled, which might account for why it feels easier for you.

irelephant@programming.dev on 28 Apr 2025 17:06 collapse

Sorry if it was unclear, I constantly get cryptic gcc errors using luarocks a package manager for lua. Its years behind pip.

gid@lemmy.blahaj.zone on 28 Apr 2025 17:12 collapse

No, you were clear. That’s what I understood you to mean.

irelephant@programming.dev on 28 Apr 2025 17:30 collapse

Ah, I’m the one who misread, sorry.

Yeah, compiling things from scratch is the norm for lua packages, making them really only work on linux.

alsimoneau@lemmy.ca on 28 Apr 2025 21:31 next collapse

Pip is amazing. It does somethings in seconds that take anaconda over an hour to do.

sexual_tomato@lemmy.dbzer0.com on 28 Apr 2025 21:44 next collapse

It’s a 17 year old tool in the world’s most popular scripting language. It’s effectively had billions of tests run against it.

Corbin@programming.dev on 29 Apr 2025 14:23 collapse

Pick a language like Perl, where some packages are written in C and some are written in pure Perl, and you’ll get to experience the same cryptic GCC errors, sometimes. There’s no secret to pip; many Python developers upload wheels with pre-compiled binaries, including Windows-compatible binaries, and so you don’t have to run GCC because they already did it for you.

irelephant@programming.dev on 29 Apr 2025 15:44 next collapse

Thanks, this is the explanation I was looking for.

Also, lua is the same, packages are either written in c or pure lua.

logging_strict@programming.dev on 06 May 2025 06:45 collapse

another interesting thing is optimizing runtime using mypyc. This is how our dev toolchain is so quick.

mypy, flake8, isort, … these kinda packages

Have never tried using mypyc would appreciate anyone sharing their experience with mypyc or other Python package compilers.