You pip install from it instead of pypi. It will in turn download from pypi and give the result to you. It will also keep itself updated, and you can batch download during the nigh packages you assume you will work.
As a result, our entire team always as most packages locally available. Changing machine, location or purging cache didn't mean loosing this benefit.
Besides, pip caching wheels doesn't mean it's not making any requests, so it's still a better experience.
For big companies, I recommend it anyway: it speeds up the entire team work, CI, allow you to publish private packages, etc.
If you can't do that, the next best things is to do "pip download", instead of "pip install", and save the wheels into a hard drive.
Thanks for the tips, I'll definitely look into them.
EDIT: And thanks for the tip from godmode2019. I upvoted you both.
However, they don't change the fact that pip by default assumes a decent Internet connection, with its short timeout and no resume on downloads, and thus is unusable with anything less.
Again, IMHO that's simply unacceptable for the official Python package manager.
Unfortunately this is the the norm of most package managers these days, and I feel sorry pip can’t make the out-of-the-box experience more pleasant for you. If you got ideas how pip can improve the experience without compromising the zero-config default (which a lot of Python newcomers rely on), please definitely feel free to suggest them; we are all ears.
I would say that Python, and especially pip, is actually relatively friendly to scenarios where non-obstructed Internet is not generally available, compared to many other offerings from other programming languages (especially those without corporate backing). Devpi was already mentioned as a solution; in fact, since pip’s --index-url accepts a file:// URL, you can even simply pre-download the wheels, arrange them in the correct hierarchy (see PEP 503) inside a thumb drive, and just pass that around. The --find-links --no-index combination may also be an interesting approach for simple setups. There are a lot of things to try, before you conclude things do not work.
I do have a few suggestions, starting from least effort for most impact:
1. AFAICT pythonhosted.org is hosted at fastly.net, which seems to be heavily throttling downloads from certain disprivileged locations, as well as downloads from cloud providers such as Linode. It would help a lot if they could ease up a little on the aggressive throttling.
2. Make the pip download timeout longer to better accommodate spotty connections.
3. Make pip downloads resumable so that a download makes progress each time pip install is run.
4. Make pip download each file over multiple HTTP connections in parallel. Download throttling applies to a single connection, so downloading over multiple connections will speedup the download.
I've had ~5 mbps download speeds for the last 5 years in a rural US location. I set up devpi on an old Raspberry Pi hoping to have this same experience, but after several months I disabled it and found it was actually slowing things down. If memory serve, the issue was that the local package lookups were excruciatingly slow (even if done in localhost), and I was surprised to see that devpi would routinely soak up multiple GB of memory and start swapping (I recall a few issues on memory leaks in their repo).
Seemed like a great idea, and perhaps I just needed something beefier than an RPi 3, but it didn't work out for me.
Depends on your platform. If you're using ARM (like AWS Graviton, and possibly Apple M1) you might find that many wheels are not available. That might be different now, my information is 2 years old, but I remember 'pip install numpy' taking ages. Every time someone pushed a change we'd have a 15 minute job clogging the pipes. Luckily I had already created an artifact repo (AWS CodeArtifact) for our own internalpackages, so I added a step to our build process to push locally built wheels, so a painfully slow build would only happen once.
oh hi, sorry for the late reply. indeed you are right; i was typing from my phone and was a bit too hasty. i am not a fan of poetry after reading these; TLDR poetry does not support PEP621 about pyproject.toml either, and i feel this is the direction the python community has been going towards recently.
also pdm is developed by frostming, who's on PyPA (Python Packaging Authority) and more libraries are extending support for pdm (streamlit just today).
but in general i am not against poetry. it's a good tool and it pushed package managers a fair bit further - providing a superior alternative to conda imho
I dunno about $600. $200-300 was a typical bill for an older detached 3BR when I was in college. split several ways of course. it wouldn't surprise me if people with significantly larger (and poorly insulated) houses paid a lot more, but that wouldn't be common. AFAIK, the vast majority of an energy bill typically comes from heating and cooling. appliances don't contribute that much.
in my current 1BR, with great insulation and neighbors above, below, and on both sides, I too pay about $60 for utilities.
No, however heating is $200 if electrical. But I work from home, so it's always on high temps, unlike for most people.
Also, that's still far from $600, that's not anymore "preventing your food to spoil", and that's only a few months a year. A/C as well, you don't usually use it in december in most parts of the US.
So yeah, I find this number surprising for a very rich country that should have great infrastructures.
From what I'm seeing, it's already better than Taxi at what Taxi is supposed to be excellent at, and yet does much more, while still not being Turing complete.
I enjoy it better than JSON, YAML, TOML, and any respective schema associated to those. Sum and Union types are a killer feature, espacially since CUE can define a type and a value using the same syntax.
But it must be hard to implement, because for now, only the reference implementation, in Go, exists.
I also personally think CUE hits a sweet spot. The union (pun intended) between types and values (both sets) is really a game changer!
CUE is indeed not trivial to implement, especially its intricate semantics are tricky. I work an a CUE alternative, called ReSeT to really understand the semantics better.
I've wanted to use cuelang twice already, but having to install the go language on Ubuntu is a major inconvenience. Instead I used NestedText (I tend to do all my parsing with Pydantic anyway).
But once you can't, then the temptation to coerce people into "the right way" is going to be too big.
Then you need to hope you don't need to go to a gay bar in an anti gay state, pay for an abortion without your parent knowing, or give financial support to a controversial political group.
So the problem isn’t the existence of a USD digital system.
The issue would only arise if cash was eliminated.
I completely agree on the need for cash, but as long as we’re also keeping cash a digital USD would solve every problem crypto claims to solve while still allowing for a non dystopian future.
In fact, crypto is completely dystopian because there is absolutely no space for cash in it, and further, by being distributed and therefore pseudonymous at best, it actually opens massive privacy and security pandora boxes.
> In fact, crypto is completely dystopian because there is absolutely no space for cash in it, and further, by being distributed and therefore pseudonymous at best, it actually opens massive privacy and security pandora boxes.
I don't think crypto positions itself as the only option (Bitcoin maxis aside). So there is definitely space for cash, space for tokenized USD, space for collateralized algo stablecoins.
Why distributed implies "pseudonimous at best"? Have you looked into what can be done with zero-knowledge proofs? With MPC?
> In fact, crypto is completely dystopian because there is absolutely no space for cash in it, and further, by being distributed and therefore pseudonymous at best, it actually opens massive privacy and security pandora boxes.
Is this true of all coins though? I know little about crypto, but I gather from reading on here while the privacy of bitcoin was greatly exaggerated/false other coins use actually privacy respecting schemes. Of course, that would assume that the schemes they use work perfectly which is probably a ridiculous assumption.
For now. Modern chips will make it harder and harder, until one day we will have almost no control over the machine we are running. For our own good, of course. Plus nobody will care appart from us. And not all of us. Not the us that are working on this techs at least.
As long as signature enforcement in BIOS can be disabled, everything is possible. And it will always be possible to disable it because otherwise someone would sue the hell out of Microsoft, OEM, or both, for not being able to run Linux or other competing OS on a PC they bought.
Given we have one win for a 1000 fails with big companies, and that they clearly don't pay much consequences for their bad actions but benefit a lot from it, I doubt it.
Espacially if this becomes state mendated for national security reasons. Indeed, have you seen anyone been sued for the PRISM program?
In fact, it's already happening: have you seen a lot of things modified in iOS lately? It's super hard, so few people even attempt now.
> have you seen a lot of things modified in iOS lately?
There's an unpatchable bootrom exploit in all devices up to and including the iPhone X. But yes, I agree with your sentiment.
Though one thing to keep in mind: phones and tablets are content-consumption devices and they have historically been locked down for about as long as they existed. Computers are productivity devices. You may want to multi-boot 10 different operating systems for very practical reasons and no one should prevent you from doing that. Manufacturers understand this. Even the Apple M1 is capable of booting arbitrary, unsigned OSes, despite being a direct descendant of the same line of locked-down SoCs used in iPhones and iPads.
And this is why I gave a try to VueJS in the first place. It can be deployed with npm, or a simple script tag.
It still does today, making prototypes easy to write, training very simple, and yet, it plays well with the more complex ecosystem.
Now of course, VueJS has Vite, which makes all the complexity of Webpack goes away, removes the slowness of compilation and has sane defaults.
Still, npm remains. I'm now used to it, but I understand that if you come from another language, it's not attractive.
It's funny to me that most people consider JS packaging better than Python packaging.
Both are troublesome, just for different reasons. E.G: using different versions of node is much harder, espacially on windows, or for the same project, than different versions of python. And installing compiled extensions is a way better experience in Python than in any other high level language. On the other hand, node_module is easier to use than the average venv.
> And this is why I gave a try to VueJS in the first place. It can be deployed with npm, or a simple script tag.
This is exactly, what I noticed positively about VueJS and advertised as a good feature for integrating this specific "web component" framework into a project. You can add it as simply as one used to add jQuery to any project. However, others thought of including script tag as "not proper" (even though I told them, that in the end it would all be a script tag anyway ...) and it was decided to use another framework, which is way more complicated to integrate in any statically rendered / server side rendered and template based website.
Simply putting VueJS in a script tag is not a problem. One can cache it easily and one can use noscript tags at places in any page templates. All is fine.
> The article acknowledges this somewhat, but it’s an example of another confidence fallacy: The idea that nobody knows what they’re talking about.
It was the opposite for me realization for . When I was young I was assuming if somebody was saying something, they were likely knowing what they were talking about.
After a bit of a ride in life, I know now that people that does do exist, but they are a rare bread, and usually about some very specific topic.
Competent people are the exception, not the rule, degraded mode is the default for humanity, and we are pretty good at going with it. At the beginning I though: what they are doing must be complicated, since it takes so much time and effort, or since there is so much debate about it. One day, you have to do it yourself, or you are behind the curtain, and you realize in 2 years anybody seriously working at it would be better that those life timers.
But still, because of the social pressure, playing pretend is the status quo for most.
Not just about jobs, not just about science, but about pretty basic things in life as well.
In fact, we are constructing a lot of our society around myths that are emerging because of this collecting behavior. It's quite fascinating to watch unfold, but it's such a waste of potential.
You pip install from it instead of pypi. It will in turn download from pypi and give the result to you. It will also keep itself updated, and you can batch download during the nigh packages you assume you will work.
As a result, our entire team always as most packages locally available. Changing machine, location or purging cache didn't mean loosing this benefit.
Besides, pip caching wheels doesn't mean it's not making any requests, so it's still a better experience.
For big companies, I recommend it anyway: it speeds up the entire team work, CI, allow you to publish private packages, etc.
If you can't do that, the next best things is to do "pip download", instead of "pip install", and save the wheels into a hard drive.