[MacPorts] #51678: yum @3.2.29_1 Cannot import yum module in python after install

MacPorts noreply at macports.org
Tue Jun 21 07:31:52 PDT 2016


#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


More information about the macports-tickets mailing list