Opened 6 years ago

Closed 6 years ago

Last modified 6 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

Description

Hello,

I update my python modules through pip with commands like

pip-2.7 install alabaster --user --upgrade

which results in

Collecting alabaster
  Downloading https://files.pythonhosted.org/packages/2e/c3/9b7dcd8548cf2c00531763ba154e524af575e8f36701bacfe5bcadc67440/alabaster-0.7.10-py2.py3-none-any.whl
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 6 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 6 years ago by gaming-hacker (G Alexander)

I don't use sudo pip, these modules are installed locally with '--user' and it seems trivial to check the pip receipts

Last edited 6 years ago by gaming-hacker (G Alexander) (previous) (diff)

comment:3 Changed 6 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 6 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 6 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.