I lost nearly all my modules installing 3.7

dieter dieter at handshake.de
Mon Jul 2 01:21:27 EDT 2018

Elliott Roper <nospam at yrl.co.uk> writes:
> ...
> I should have mentioned that none of this went wrong in 3.6. All I'm after 
> are packages I can install with pip3. I really don't need to go down all the 
> twisty passages installing Fortran

"pip[*]" is a tool to install Python packages.
But some Python packages are not pure Python and require
additional (beyond Python) infrastructure in your target system:
e.g. additional (operating) system packages, compilers, utilities, ...

Ideally, the installation instructions for a package would
describe which infrastructure is necessary. Of course,
you would need to consult them to find out whether a package
is pure Python or what additional components are necessary
in the target.

In my view, the packages you have reported problems with
do quite a good job: they provide precise and helpfull
error/warning messages during the installation process.
With their help, you can resolve the problems (or decide that
you do not need the package).

Side note: a missing "pkg-config" or Fortran compiler
is very likely not a "3.6" versus "3.7" issue.
It has to do with the target system (and its available infrastructure),
maybe the versions of the installed packages but not
the Python versions.

> I DID have pkg-config installed in ~/Library ..... site-packages.

Jim told us that "pkg-config" is not a Python package (but an
(operating) system package). Therefore, its expected place
is not below ".../site-packages". You must install it where
system packages are looked for -- or use system specific configuration
(likely, the envvar "PATH" in your case)
to look where you have installed it.

> uninstalled it and re-installed with an Admin account, where it appeared in 
> /Library ... site-packages
> but that made no difference, pip3 install -- user matplotlib still 
> complaining about pkg-config

"pkg-config" (once successfully installed) will provide
an operating system command "pkg-config". You can check whether
it is available and working by invoking "pkg-config" from the command

On my system (Ubuntu) is is located at "/usr/bin/pkg-config".

On *nix like systems the envvar "PATH" controls where
operating system level commands are looked for.
Badly configuring "PATH" can lead to unexpectedly not finding
some commands.

> ...
> I do have write access. It looks like a Mac specific per user directory tree 
> for temporary stuff and installation records.

Apparently, you are on a "Mac". Its OS 10 started as
a *nix like system - but with many peculiarities. Not sure,
what of the above is applying.

What remains true: your "pkg-config" problem is not
a Python problem but an operating system level problem --
either with the installation of the "pkg-config" package
or with the configuration where commands are looked for.

More information about the Python-list mailing list