cfbolz changed the topic of #pypy to: #pypy PyPy, the flexible snake https://pypy.org | IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end and https://libera.irclog.whitequark.org/pypy | hacking on TLS is fun, way more fun than arguing over petty shit, turns out
infernix has quit [Ping timeout: 246 seconds]
infernix has joined #pypy
otisolsen70 has joined #pypy
indyZ has joined #pypy
<indyZ> Hi. I think I'm doing something wrong. I am runing Ubuntu 20.04 and installed the "pypy" pacakge from the repos. When I run my program using "pypy3" instead of "python3," "import PIL" seems to fail because it's trying to load PIL from /usr/lib/python3/dist-packages, aka where my distro keeps cpython packages.
<indyZ> Also, if I try "pypy3 -m pip install pillow" it complains that pillow is already in /usr/lib/python3/dist-packages. So my question is, how do I get pypy to install its own PIL or pillow, instead of clashing with the cpython module?
<indyZ> This is the actual error from "from PIL import Image": ImportError: cannot import name '_imaging'
<indyZ> Or am I going about this all wrong?
Olliemath has joined #pypy
slav0nic has joined #pypy
<mattip> indyZ: debian/ubuntu packages pypy in a way that tries to share /usr/lib/python3, but on the other hand does not ship pypy3-specific binary packages
<mattip> this creates a confusing situation where users think they have a valid package for pypy (like PIL) but in fact do not
<mattip> so you need to install pypy-specific packages, which are available via "pip"
<mattip> another option is to use conda, since then the chances you will be able to use pre-compiled binary packages is greater
<mattip> there are ~1000 precompiled binary packages in conda, and much fewer on PyPI
<mattip> if all you need is PIL and NumPy, you may be able to get by
<Olliemath> I have good luck using the ubuntu PPA https://launchpad.net/~pypy/+archive/ubuntu/ppa (as long as you don't mind frequent version bumps - which I reagard as a good thing ;) )
fotis has joined #pypy
jacob22 has quit [Ping timeout: 260 seconds]
fotis has quit [Ping timeout: 260 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 260 seconds]
otisolsen70 has quit [Quit: Leaving]
jacob22 has joined #pypy
Dejan has joined #pypy
fotis has joined #pypy
fotis has quit [Ping timeout: 260 seconds]
Olliemath has quit [Ping timeout: 256 seconds]
Olliemath has joined #pypy
fotis has joined #pypy
fotis has quit [Ping timeout: 245 seconds]
<tumbleweed> olliemath: those packages are conceptually the same ones as in the primary archive, just always the latest version
<Olliemath> hmm, my bad then - I must have done some extra voodoo to get it working
<Olliemath> I have both the apt version of pillow and several pypy venvs with pillow on ubuntu 20.04
<mattip> ahh, so pypy3-pillow is a package and I was giving bad advice?
<Olliemath> ^ not an apt package - I meant that I just installed it via pip
<Olliemath> possibly I get away with this because I use "https://bootstrap.pypa.io/get-pip.py | python3" to install pip, rather than using the version in apt?
<tumbleweed> olliemath: pypy3-pillow *could* (and should) be a package, but isn't there yet
<tumbleweed> err mattip
<tumbleweed> olliemath: python3-pip should work just fine
<tumbleweed> but really, you should use pypy3 -m venv to create a virtualenv and install stuff in there with its pip
olliemath71 has joined #pypy
Olliemath has quit [Ping timeout: 256 seconds]
<mattip> thanks for the clarification
Atque has joined #pypy
Atque has quit [Quit: ...]
Atque has joined #pypy
otisolsen70 has joined #pypy
Julian has joined #pypy
Julian has quit [Client Quit]
<cfbolz> I am now officially terminally confused by the object model
<cfbolz> ah, no, good again
olliemath71 has quit [Ping timeout: 256 seconds]
<cfbolz> and with that pip works on pypy3.9
fotis has joined #pypy
fotis has quit [Ping timeout: 260 seconds]
<mattip> whohoo!
otisolsen70 has quit [Quit: Leaving]
slav0nic has quit [Ping timeout: 258 seconds]
<indyZ> mattip: thanks for the insight re: pypy, PIL and ubuntu. Sounds like I ought to just remove the distro packages alltogether and go another route.
<indyZ> since "pip" clashes with the cpython packages
<indyZ> or use a virtualenv.