Walt Mankowski via plug on 16 May 2020 13:14:35 -0700


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

Re: [PLUG] Fixing a Python library mismatch


On Sat, May 16, 2020 at 01:47:49PM -0400, brent timothy saner via plug wrote:
> > Thanks, I'll take a look at venv. I have a hunch this is a more of a
> > problem with pip though. See below.
> 
> yep! i bring it up because the pyvenv script was deprecated in 3.6:
> https://docs.python.org/dev/whatsnew/3.6.html#deprecated-python-modules-functions-and-methods

I think both venv and pyvenv are more than I need most of the
time. This was something I'd written for last year's Advent of Code
and if that was no longer working than I was going to have a problem
with python in general.

I have used the ruby equivalent after a previous Ubuntu upgrade broke
something, and it was very useful there. I'll keep venv in mind for
when I work on bigger projects.

> as noted in your second reply, though, interestingly noted is two
> deprecations below in that very link is the --with-system-ffi build flag
> deprecation as 3.6 onwards it's the default if you're building python
> from source, and they force using the system libffi for 3.7 onwards.
> technically a coincidence, but worth noting since it's marginally relevant.

Interesting, but it's hard to know how best to take advantage of
that. I just installed python with

  pyenv install 3.8.2

and I suppose I figured the default would probably be OK for me.

> yeah, pip has something called wheels in newer python releases:
> 
> https://pip.pypa.io/en/stable/reference/pip_wheel/
> https://pythonwheels.com/
> 
> not all packages have (or can have) wheels (for instance, the
> python-ldap module can't use wheels because it needs to use the system
> openldap libs/headers), but they definitely speed up the install process
> since they don't require compilation.
> 
> you can tell if a module does a wheel install or not by going to its
> pypi "Downlod files" page and looking for a wheel there.
> e.g. https://pypi.org/project/python-ldap/#files has no wheel files,
> https://pypi.org/project/numpy/#files does ("*.whl").
> 
> you can explicitly disable the use of wheels in pip via the following:
> 
> pip < 10.x:
> 
> <pip install> --no-use-wheel <package>
> 
> pip >= 10.x:
> 
> <pip install> --no-binary <package>
> 

Thanks!

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