Walt Mankowski via plug on 16 May 2020 04:59:58 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Fixing a Python library mismatch


On Fri, May 15, 2020 at 09:26:30PM -0400, brent timothy saner via plug wrote:
> three ways to fix:
> 
> ONE: the proper, stable way
> 
> use numpy and python 3 from the ubuntu repositories. this ensures the
> modules and system libraries are always in sync (unless a packager
> somewhere made an oopsie).

Sure, but of course I want to have the latest and greatest packages,
and also follow new Python versions. :)

> TWO A: the "i don't like the proper, stable way" way
> a.k.a. the "i know better than the distro packagers" way
> 
> just recreate your env. i'd recommend using venv rather than pyenv,
> though, since it's stdlib in python3.3+
> (https://docs.python.org/3/library/venv.html). since it looks like
> you're using python3.8, and assuming it's installed system-wide,
> 
> python3.8 -m venv some_venv_dir

Thanks, I'll take a look at venv. I have a hunch this is a more of a
problem with pip though. See below.

> TWO B: the "fuck that" way
> 
> uninstall numpy from your pyenv and reinstall it. as long as it doesn't
> keep a build cache, it should build from whatever libffi is available.

I've already tried that numerous times. Also tried

$ pip cache purge
$ pip install numpy --no-cache-dir

but I'm still having the same problem.

> THREE: the honeybadger way
> a.k.a. the yolo way
> 
> this is a hack, but it works 9 times out of 10.
> 
> just symlink the lib.
> 
> cd /usr/lib64[0]
> ln -s libffi.so[1] libffi.so.6

Noted, but this seems like the sort of thing that is likely to happen
again and I'd like to know how to properly fix it.

The reason I suspect pip is that then I install big packages in Perl
it takes several minutes to compile the code and run all the
tests. But when I install packages with pip they all install in a few
seconds. This leads me to believe it's downloading a pre-compiled
version of numpy.

Walt

Attachment: signature.asc
Description: PGP signature

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug