[MacPorts] #51678: yum @3.2.29_1 Cannot import yum module in python after install
#51678: yum @3.2.29_1 Cannot import yum module in python after install ------------------------+-------------------------------- Reporter: aszostak@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Keywords: | Port: yum ------------------------+-------------------------------- I would expect that after installing the yum port that I should be able to import the module within python. However this fails. See below: {{{ macosx-10-9:~ vagrant$ sudo port install yum ---> Computing dependencies for yum ... ---> Cleaning yum ---> Scanning binaries for linking errors ---> No broken files found. macosx-10-9:~ vagrant$ which python /opt/local/bin/python macosx-10-9:~ vagrant$ python Python 2.7.11 (default, Mar 1 2016, 18:08:21) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import yum Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named yum
}}} It appears that the yum port installs the module under: {{{ /opt/local/lib/python/site-packages }}} rather than the following path where all other python 2.7 packages appear to be installed: {{{ /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages }}}
-- Ticket URL: <https://trac.macports.org/ticket/51678> MacPorts <https://www.macports.org/> Ports system for OS X
#51678: yum @3.2.29_1 Cannot import yum module in python after install -------------------------+-------------------------------- Reporter: aszostak@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: yum | -------------------------+-------------------------------- Comment (by mf2k@…): What is the output of the following? {{{ ls -l /opt/local/bin/python }}} -- Ticket URL: <https://trac.macports.org/ticket/51678#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#51678: yum @3.2.29_1 Cannot import yum module in python after install -------------------------+-------------------------------- Reporter: aszostak@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: yum | -------------------------+-------------------------------- Comment (by aszostak@…): I get: {{{ macosx-10-9:~ vagrant$ ls -l /opt/local/bin/python lrwxr-xr-x 1 root admin 24 Jun 21 03:09 /opt/local/bin/python -> /opt/local/bin/python2.7 }}} -- Ticket URL: <https://trac.macports.org/ticket/51678#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#51678: yum @3.2.29_1 Cannot import yum module in python after install -------------------------+--------------------- Reporter: aszostak@… | Owner: n3npq@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: yum | -------------------------+--------------------- Changes (by mf2k@…): * owner: macports-tickets@… => n3npq@… * cc: n3npq@… (removed) -- Ticket URL: <https://trac.macports.org/ticket/51678#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#51678: yum @3.2.29_1 Cannot import yum module in python after install -------------------------+--------------------- Reporter: aszostak@… | Owner: n3npq@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: yum | -------------------------+--------------------- Comment (by afb@…): Most likely it is hardcoded to lib/python somewhere. {{{ PYSYSDIR := $(shell $(PYTHON) -c 'import sys; print sys.prefix') PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER) PKGDIR = $(PYLIBDIR)/site-packages/$(PACKAGE) }}} It is not meant to be portable, whatsoever. -- Ticket URL: <https://trac.macports.org/ticket/51678#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts