this post was submitted on 28 Apr 2025
16 points (100.0% liked)

Python

7265 readers
35 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

πŸ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
πŸ’“ Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 2 years ago
MODERATORS
 

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?

top 26 comments
sorted by: hot top controversial new old
[–] [email protected] 29 points 2 months ago (3 children)

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.

[–] [email protected] 3 points 2 months ago (1 children)

Compared to luarocks, pip is amazing.

[–] [email protected] 10 points 2 months ago (1 children)

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

[–] [email protected] 4 points 2 months ago

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

[–] [email protected] 3 points 2 months ago* (last edited 2 months ago)

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

[–] [email protected] 2 points 2 months ago

Today I learned about uv-package manager ; thanks!

[–] [email protected] 15 points 2 months ago (1 children)

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.

[–] [email protected] 1 points 2 months ago* (last edited 2 months ago) (1 children)

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

[–] [email protected] 3 points 2 months ago (1 children)

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

[–] [email protected] 2 points 2 months ago

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.

[–] [email protected] 11 points 2 months ago

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.

[–] [email protected] 6 points 2 months ago

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

[–] [email protected] 5 points 2 months ago (2 children)

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.

[–] [email protected] 2 points 2 months ago

Thanks, this is the explanation I was looking for.

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

[–] [email protected] 1 points 2 months ago

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.

[–] [email protected] 3 points 2 months ago (1 children)

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 https://github.com/luarocks/luarocks/blob/main/docs/installation_instructions_for_windows.md

I use Mint btw

[–] [email protected] 1 points 2 months ago

The instructions don't work half the time.

[–] [email protected] 2 points 2 months ago (1 children)

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

[–] [email protected] 3 points 2 months ago (2 children)

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

[–] [email protected] 2 points 2 months ago (1 children)

Who are you writing package for?

backend stuff need not run on Windows at all.

[–] [email protected] 1 points 2 months ago (1 children)

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.

[–] [email protected] 2 points 2 months ago (1 children)

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.

[–] [email protected] 1 points 2 months ago

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.

[–] [email protected] 1 points 2 months ago (1 children)

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

[–] [email protected] 2 points 2 months ago (1 children)

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

[–] [email protected] 1 points 2 months ago

@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