[MacPorts] #35685: python27 @2.7.3_0 cannot import module 'random'
#35685: python27 @2.7.3_0 cannot import module 'random' ----------------------------+----------------------------------------------- Reporter: borisd@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Keywords: | Port: ----------------------------+----------------------------------------------- After fresh install of macports on Mountain Lion, python27 gives the following error: {{{ Python 2.7.2 (default, Jun 20 2012, 16:23:33) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import random Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.py", line 47, in <module> from os import urandom as _urandom ImportError: cannot import name urandom }}}
Not sure if it's related, but the version reported by python is also wrong: 2.7.2, while the installed and activated port should be 2.7.3. -- Ticket URL: <https://trac.macports.org/ticket/35685> MacPorts <http://www.macports.org/> Ports system for Mac OS
#35685: python27 @2.7.3_0 cannot import module 'random' -----------------------------+---------------------------------------------- Reporter: borisd@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: invalid | Keywords: Port: python27 | -----------------------------+---------------------------------------------- Changes (by ryandesign@…): * status: new => closed * cc: jwa@… (added) * resolution: => invalid * port: => python27 Comment: Replying to [ticket:35685 borisd@…]:
After fresh install of macports on Mountain Lion, python27 gives the following error:
{{{ Python 2.7.2 (default, Jun 20 2012, 16:23:33) }}} This is Apple's Python included with OS X, not MacPorts'. [snip]
Not sure if it's related, but the version reported by python is also wrong: 2.7.2, while the installed and activated port should be 2.7.3.
Further evidence of above. If you want to use MacPorts python27, run "python2.7" or else use "sudo port select python python27". -- Ticket URL: <https://trac.macports.org/ticket/35685#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts