I lost nearly all my modules installing 3.7

Elliott Roper nospam at yrl.co.uk
Fri Jun 29 20:33:28 EDT 2018


On 29 Jun 2018, Terry Reedy wrote
(in article<mailman.189.1530233555.7721.python-list at python.org>):

> On 6/28/2018 6:45 PM, Elliott Roper wrote:
> > On 28 Jun 2018, Terry Reedy wrote
>
> > > There is a pip command for making an editable file of installed
> > > packages. Run that in 3.6, perhaps after updating everything.
> > >
> > >
> > > There is another pip command for using that file to install everything
> > > listed. Run that in 3.7.
> >
> > I can't see the pip commands you mention for writing a file from 3.6
> and
> > reading it back for 3.7
> > Is it pip freeze -r <file>  followed by pip install -r<file>? If so, what is
> > meant by 'the given requirements file' in the freeze options?
>
> 'pip freeze' sends the requirements list to stdout in alphabetical
> order. You redirect or copy-paste to a file. I have not done this, but
> apparently -r <file>  uses file as a template for selecting and ordering
> the requirements. I presume pip will ignore any versions in the
> template and list the actual installed versions.
Thanks Terry. The freeze worked but the install -r looked like it was doing 
the right thing but ended up doing nothing after complaining about matplotlib 
being unable to install one of its dependencies IIRC

I have deleted every trace of python following every element on sys.path for 
every version I had except for Apple's 2.6 and then reinstalled 3.7 from 
python.org's downloads. Then using the output from my 3.6 freeze, I installed 
each package on that list one by one with the --user option.

That worked well except for two of the biggies I wanted to play with -- scipy 
and matplotlib.
I did get numpy and pandas to install that way, which is a large part I need 
for what I am playing with.

install scipy wrote an error message longer than War and Peace that finished 
with:-
____________________________________________________________________________
error: library dfftpack has Fortran sources but no Fortran compiler found

----------------------------------------
Command "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u 
-c "import setuptools, 
tokenize;__file__='/private/var/folders/v2/gj68t3zx3bd6764zxc332ctc0000gr/T/pi
p-install-np76k73m/scipy/setup.py';f=getattr(tokenize, 'open', 
open)(__file__);code=f.read().replace('\r\n', 
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --record 
/private/var/folders/v2/gj68t3zx3bd6764zxc332ctc0000gr/T/pip-record-
0norcg4s/install-record.txt --single-version-externally-managed --compile 
--user --prefix=" failed with error code 1 in 
/private/var/folders/v2/gj68t3zx3bd6764zxc332ctc0000gr/T/pip-install-
np76k73m/scipy/
______________________________________________________________________________
_
and matplotlib produced a beautifully formatted report that started with:
__________________
Complete output from command python setup.py egg_info:
IMPORTANT WARNING:
pkg-config is not installed.
matplotlib may not be able to find some of its dependencies
============================================================================
Edit setup.cfg to change the build options
_______________________
and finished with
* The following required packages can not be built:
* png

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in 
/private/var/folders/v2/gj68t3zx3bd6764zxc332ctc0000gr/T/pip-install-
3fnvrt2b/matplotlib/
___________________________________________________

Both look like not having write access to 
/private/var/folders/v2/gj68t3zx3bd6764zxc332ctc0000gr/T/pip-install-
np76k73m/

since I was installing with the --user switch, it looks like a bug in pip. It 
should have guessed I was a non-priviliged user. But then that "Edit 
setup.cfg to change the build options" is intriguing, especially since 'pip3 
config list' returns nothing.

Still. I have got a fair way there. Thanks so much for your help. It would be 
great if there were a Mac user with as much patience for numpties.

To de-mung my e-mail address:- fsnospam$elliott$$ PGP Fingerprint: 1A96 3CF7 
637F 896B C810 E199 7E5C A9E4 8E59 E248




More information about the Python-list mailing list