Thanks for your help: > On 10 Sep 2016, at 19:38, Lawrence Velázquez <lar...@macports.org> wrote: > >> On Sep 10, 2016, at 1:42 PM, David Epstein <david.epst...@warwick.ac.uk> >> wrote: >> >> I gave the command: >> >> ls -l /opt/local/bin/py* >> and the system replied: >> >>> lrwxr-xr-x 1 root wheel 23 9 Jun 19:13 /opt/local/bin/pydoc@ -> >>> /opt/local/bin/pydoc2.7 >>> lrwxr-xr-x 1 root wheel 23 9 Jun 17:19 /opt/local/bin/pydoc3@ -> >>> /opt/local/bin/pydoc3.5 >>> lrwxr-xr-x 1 root wheel 24 9 Jun 19:13 /opt/local/bin/python@ -> >>> /opt/local/bin/python2.7 >>> lrwxr-xr-x 1 root wheel 31 9 Jun 19:13 /opt/local/bin/python-config@ -> >>> /opt/local/bin/python2.7-config >>> lrwxr-xr-x 1 root wheel 24 9 Jun 17:19 /opt/local/bin/python3@ -> >>> /opt/local/bin/python3.5 >>> lrwxr-xr-x 1 root wheel 31 9 Jun 17:19 /opt/local/bin/python3-config@ >>> -> /opt/local/bin/python3.5-config >>> lrwxr-xr-x 1 root wheel 25 9 Jun 17:19 /opt/local/bin/python3m@ -> >>> /opt/local/bin/python3.5m >>> lrwxr-xr-x 1 root wheel 32 9 Jun 17:19 /opt/local/bin/python3m-config@ >>> -> /opt/local/bin/python3.5m-config >>> lrwxr-xr-x 1 root wheel 25 9 Jun 19:13 /opt/local/bin/pythonw@ -> >>> /opt/local/bin/pythonw2.7 >>> lrwxr-xr-x 1 root wheel 25 9 Jun 17:19 /opt/local/bin/pyvenv@ -> >>> /opt/local/bin/pyvenv-3.5 > > Those are symlinks created by "port select". Presumably you set up the > python, python2, and python3 select groups at some point. > >> You will see that none of the files on the righthand side of the arrow -> >> appears on any lefthand side. I tried “port provides” on both lefthand and >> righthand sides and received error messages from port such as >>> /opt/local/bin/pydoc2.7 does not exist. > > Did you uninstall python27?
I think so. The ls -l command above does not find /opt/local/bin/python*, except for symbolic links. What port command could I give to make sure? What port command can I give to extirpate remnants of an uninstalled port, if there are any remnants? >> and >>> /opt/local/bin/pydoc is not provided by a MacPorts port. > > Right, because that file was created by "port select" and not a port. > >> How do I get rid of the symbolic links, other than using /bin/rm, something >> I have been told never to do? >> >> How can I find all hanging links like this in /opt? Presumably there is a >> clever formula using unix find. > > Try running "port select --summary" (although I'm not sure whether this > feature has been released). It will list the select groups on your system and > their current settings. If any of those settings corresponds to a port you > have uninstalled, you should be able to remove the symlinks with I ran “port select —summary” as you suggested and got the response Name Selected Options ==== ======== ======= cython none none gcc none none ipython none none ipython2 none none ipython3 none none llvm none mp-llvm-3.5 none nosetests none none pip none none python none python26-apple python27-apple none python2 none python26-apple python27-apple none python3 none none I do not want to rely on my memory of which of these I have uninstalled. I need to be told by a reliable program. What would happen if I gave one of your commands below, with argument a port that was still installed? Since I do not yet know the answer to that question, I will refrain for the moment from issuing any of these commands. My guess is that only the symbolic link would be removed, leaving the true file in place, but I would like to be sure before I take any action. > sudo port select --set python none > sudo port select --set python2 none > sudo port select --set python3 none > etc etc etc > >> I wonder what causes this kind of problem? I cannot remember any of my port >> processes terminating incorrectly. I have lately been uninstalling >> python-related ports, because I had too many different versions of python on >> my machine, and I was getting confused. > > The symlinks created by "port select" are not modified if the selected port > is subsequently deactivated or uninstalled. I think there is an open ticket > about this, but I can't find it at the moment. > > vq _______________________________________________ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users