Opened 10 years ago

Closed 10 years ago

#45564 closed defect (invalid)

python27: platform.mac_ver() fails

Reported by: xixi.wang577@… Owned by: jyrkiwahlstedt
Priority: Normal Milestone:
Component: ports Version: 2.3.2
Keywords: Cc:
Port: python27

Description

sudo port install py27-numpy py27-scipy py27-matplotlib py27-ipython +notebook py27-pandas py27-sympy py27-nose
Password:
--->  Computing dependencies for py27-numpy
--->  Dependencies to be installed: py27-nose py27-setuptools
--->  Building py27-setuptools
Error: org.macports.build for port py27-setuptools returned: command execution failed
Error: Failed to install py27-setuptools
Please see the log file for port py27-setuptools for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-setuptools/py27-setuptools/main.log
Error: The following dependencies were not installed: py27-nose py27-setuptools
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port py27-numpy failed

Attachments (1)

main.log (26.0 KB) - added by xixi.wang577@… 10 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 10 years ago by xixi.wang577@…

Cc: xixi.wang577@… added

Cc Me!

comment:2 Changed 10 years ago by xixi.wang577@…

Cc: xixi.wang577@… removed

Cc Me!

comment:3 Changed 10 years ago by larryv (Lawrence Velázquez)

We’ll have to see the log. Could you run the following commands and attach the main.log file that’s mentioned at failure?

% sudo port clean py27-numpy py27-setuptools
% sudo port install py27-setuptools

comment:4 in reply to:  3 ; Changed 10 years ago by xixi.wang577@…

Replying to larryv@…:

We’ll have to see the log. Could you run the following commands and attach the main.log file that’s mentioned at failure?

% sudo port clean py27-numpy py27-setuptools
% sudo port install py27-setuptools

Hi,

I ran the commands and attached the log file here: (I just copy and paste and I'm sorry if the log file is not in the right format.. i'm a beginner ;)) Thanks!

:info:build     rootObject = p.parse(pathOrFile)
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 406, in parse
:info:build     parser.ParseFile(fileobj)
:info:build xml.parsers.expat.ExpatError: XML or text declaration not at start of entity: line 2, column 0
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-setuptools/py27-setuptools/work/setuptools-7.0" && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py --no-user-cfg build
:info:build Exit code: 1
:error:build org.macports.build for port py27-setuptools returned: command execution failed
:debug:build Error code: CHILDSTATUS 84141 1
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"portbuild::build_main org.macports.build"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
:info:build Warning: targets not executed for py27-setuptools: org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Please see the log file for port py27-setuptools for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-setuptools/py27-setuptools/main.log

comment:5 in reply to:  4 ; Changed 10 years ago by larryv (Lawrence Velázquez)

Your snippet doesn’t quite include the whole error. Could you attach the entire file using the “Attach file” button above, under the ticket description?

Changed 10 years ago by xixi.wang577@…

Attachment: main.log added

comment:6 in reply to:  5 Changed 10 years ago by xixi.wang577@…

Replying to larryv@…:

Your snippet doesn’t quite include the whole error. Could you attach the entire file using the “Attach file” button above, under the ticket description?

Hi, please see the attachment. Thanks!

comment:7 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to jmr@…
Port: py-setuptools added; py27-setuptools removed

comment:8 Changed 10 years ago by jmroot (Joshua Root)

Owner: changed from jmr@… to jwa@…
Port: python27 added; py-setuptools removed
Summary: py27-setuptools @2.3.2: failed to install py27-setuptoolspython27: platform.mac_ver() fails

This appears to actually be python27 failing to parse your /System/Library/CoreServices/SystemVersion.plist.

Start MacPorts python2.7 and run this to confirm:

import platform
platform.mac_ver()

That is meant to return something like this:

('10.10', ('', '', ''), 'x86_64')

comment:9 in reply to:  8 ; Changed 10 years ago by xixi.wang577@…

Replying to jmr@…:

This appears to actually be python27 failing to parse your /System/Library/CoreServices/SystemVersion.plist.

Start MacPorts python2.7 and run this to confirm:

import platform
platform.mac_ver()

That is meant to return something like this:

('10.10', ('', '', ''), 'x86_64')

Hi, I'm using python27-apple and after running the commands, I got

  File "<stdin>", line 1, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/platform.py", line 809, in mac_ver
    info = _mac_ver_xml()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/platform.py", line 786, in _mac_ver_xml
    pl = plistlib.readPlist(fn)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 78, in readPlist
    rootObject = p.parse(pathOrFile)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 406, in parse
    parser.ParseFile(fileobj)
xml.parsers.expat.ExpatError: XML or text declaration not at start of entity: line 2, column 0

comment:10 in reply to:  9 ; Changed 10 years ago by larryv (Lawrence Velázquez)

Replying to xixi.wang577@…:

Hi, I'm using python27-apple

Try it with /opt/local/bin/python2.7.

comment:11 in reply to:  10 Changed 10 years ago by xixi.wang577@…

Replying to larryv@…:

Replying to xixi.wang577@…:

Hi, I'm using python27-apple

Try it with /opt/local/bin/python2.7.

Hi, I tried /opt/local/bin/python2.7 but I still got same msg. :(

comment:12 Changed 10 years ago by ned-deily (Ned Deily)

I'm not seeing a problem installing the latest setuptools from source with any Python 2.7 I have on OS X 10.10. Perhaps the system file has been modified. It should look like this:

$ ls -l /System/Library/CoreServices/SystemVersion.plist
-r--r--r--  1 root  wheel  477 Oct  9 03:43 /System/Library/CoreServices/SystemVersion.plist
$ file /System/Library/CoreServices/SystemVersion.plist
/System/Library/CoreServices/SystemVersion.plist: XML  document text
$ more /System/Library/CoreServices/SystemVersion.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>ProductBuildVersion</key>
        <string>14A389</string>
        <key>ProductCopyright</key>
        <string>1983-2014 Apple Inc.</string>
        <key>ProductName</key>
        <string>Mac OS X</string>
        <key>ProductUserVisibleVersion</key>
        <string>10.10</string>
        <key>ProductVersion</key>
        <string>10.10</string>
</dict>
</plist>

comment:13 in reply to:  12 Changed 10 years ago by xixi.wang577@…

Hi, thanks a lot for your help! I found out that the system file has been modified and I changed it back, it works very well now! Replying to nad@…:

I'm not seeing a problem installing the latest setuptools from source with any Python 2.7 I have on OS X 10.10. Perhaps the system file has been modified. It should look like this:

$ ls -l /System/Library/CoreServices/SystemVersion.plist
-r--r--r--  1 root  wheel  477 Oct  9 03:43 /System/Library/CoreServices/SystemVersion.plist
$ file /System/Library/CoreServices/SystemVersion.plist
/System/Library/CoreServices/SystemVersion.plist: XML  document text
$ more /System/Library/CoreServices/SystemVersion.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>ProductBuildVersion</key>
        <string>14A389</string>
        <key>ProductCopyright</key>
        <string>1983-2014 Apple Inc.</string>
        <key>ProductName</key>
        <string>Mac OS X</string>
        <key>ProductUserVisibleVersion</key>
        <string>10.10</string>
        <key>ProductVersion</key>
        <string>10.10</string>
</dict>
</plist>

comment:14 Changed 10 years ago by mf2k (Frank Schima)

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.