Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#56530 closed defect (invalid)

port needs to check if python module has been installed/upgraded with pip

Reported by: gaming-hacker (G Alexander) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.4.4
Keywords: Cc:
Port: alabaster



I update my python modules through pip with commands like

pip-2.7 install alabaster --user --upgrade

which results in

Collecting alabaster
Installing collected packages: alabaster
Successfully installed alabaster-0.7.10

checking for outdated ports returns

The following installed ports are outdated:
py27-alabaster                 0.7.6_0 < 0.7.10_0

which is obviously not the case since, it is now updated.

Change History (5)

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

Resolution: invalid
Status: newclosed

No, using sudo pip to install/upgrade python modules in site-packages is incompatible with MacPorts. You must not install files into ${prefix} that are not managed by MacPorts.

If you need python modules from pip, use a virtualenv.

comment:2 Changed 3 years ago by gaming-hacker (G Alexander)

I don't use sudo pip, these modules are installed locally with '--user'

Version 0, edited 3 years ago by gaming-hacker (G Alexander) (next)

comment:3 Changed 3 years ago by kencu (Ken)

It sounds like an interesting idea, but the opportunities for complications and errors are high. Nevertheless, if you put something together that works, no doubt we would be delighted to take a look at it and see if it can be intertwined into MacPorts!

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

Okay, so if you used pip --user, you installed the python modules into your home. Python modules in your home are not usable system-wide. Therefore this would not be a general replacement for the python module installed by the corresponding port.

comment:5 Changed 3 years ago by mf2k (Frank Schima)

Cc: nomaintainer removed
Keywords: python pip install user upgrade removed

Please do not Cc "nomaintainer" because it is not associated with a person.

Note: See TracTickets for help on using tickets.