Opened 2 years ago

Closed 2 years ago

#56278 closed defect (invalid)

py-pip: Does not install ${prefix}/bin/pipX.Y

Reported by: l-g Owned by: stromnov (Andrew Stromnov)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: py-pip

Description

I just installed some utilities using pip from MacPorts and was surprised that I didn't have access to them automatically/after a rehash/in a new terminal.

Wouldn't it make sense to include ./opt/local/Library/Frameworks/Python.framework/Versions/3.4/bin/pip3.4 and similar directories in $PATH when they are created? Should be simple to include the relevant commands in the portfile.

Change History (4)

comment:1 Changed 2 years ago by ryandesign (Ryan Schmidt)

MacPorts ports don't modify the user's path. Only the MacPorts installer modifies the user's path, and then only to add /opt/local/bin and /opt/local/sbin.

comment:2 Changed 2 years ago by raimue (Rainer Müller)

Owner: set to stromnov
Port: py-pip added
Status: newassigned
Summary: Automatically include /opt/local/Library/Frameworks/Python.framework/Versions/3.4/bin/ into $PATHpy-pip: Does not install ${prefix}/bin/pipX.Y
Type: enhancementdefect

As MacPorts provides multiple versions of python, these tools inherently conflict. Therefore they are usually installed with the appropriate version suffix into /opt/local/bin.

There should be a symlink at /opt/local/bin/pip3.4. But apparently there is not, so this is a bug with the py-pip port.

See also the notes for python34 and related ports on how to make this version the default:

$ port notes python34
python34 has the following notes:
  To make this the default Python or Python 3 (i.e., the version run by the 'python' or 'python3' commands), run one
  or both of:

      sudo port select --set python python34
      sudo port select --set python3 python34
$ port notes py34-pip
py34-pip has the following notes:
  To make the Python 3.4 version of pip the one that is run when you execute the commands without a version suffix,
  e.g. 'pip', run:

  port select --set pip pip34

comment:3 in reply to:  2 Changed 2 years ago by ryandesign (Ryan Schmidt)

Replying to raimue:

There should be a symlink at /opt/local/bin/pip3.4. But apparently there is not, so this is a bug with the py-pip port.

There is a symlink /opt/local/bin/pip-3.4. So there is no bug.

comment:4 Changed 2 years ago by raimue (Rainer Müller)

Resolution: invalid
Status: assignedclosed

Fair enough, I would have expected it to follow the naming scheme of pythonX.Y, but both types of suffixes (X.Y and -X.Y) exist in various ports... Then there really is no bug in py-pip.

Note: See TracTickets for help on using tickets.