Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#55199 closed defect (invalid)

xattr broken by installing packages with pip into home directory: The 'xattr==0.6.4' distribution was not found and is required by the application

Reported by: zhangcs (Chensong Zhang) Owned by: larryv (Lawrence Velázquez)
Priority: Normal Milestone:
Component: ports Version: 2.4.2
Keywords: Cc:
Port:

Description (last modified by ryandesign (Ryan Carsten Schmidt))

sudo port upgrade libtool
--->  Fetching archive for libtool
--->  Attempting to fetch libtool-2.4.6_4+universal.darwin_17.i386-x86_64.tbz2 from https://pek.cn.packages.macports.org/macports/packages/libtool
--->  Attempting to fetch libtool-2.4.6_4+universal.darwin_17.i386-x86_64.tbz2 from http://kmq.jp.packages.macports.org/libtool
--->  Attempting to fetch libtool-2.4.6_4+universal.darwin_17.i386-x86_64.tbz2 from https://packages.macports.org/libtool
--->  Fetching distfiles for libtool
--->  Attempting to fetch libtool-2.4.6.tar.gz from http://cjj.kr.distfiles.macports.org/libtool
--->  Verifying checksums for libtool
--->  Extracting libtool
--->  Applying patches to libtool
--->  Configuring libtool
--->  Building libtool
--->  Staging libtool into destroot
Error: Failed to destroot libtool: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libtool/libtool/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

Attachments (1)

main.log (74.7 KB) - added by zhangcs (Chensong Zhang) 7 years ago.
main.log

Download all attachments as: .zip

Change History (11)

Changed 7 years ago by zhangcs (Chensong Zhang)

Attachment: main.log added

main.log

comment:1 Changed 7 years ago by kencu (Ken)

would you mind pasting the output of which xattr and xattr -h ? Thanks.

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

Description: modified (diff)
Owner: set to larryv
Status: newassigned
Summary: Fail to upgrade libtoollibtool @2.4.6: The 'xattr==0.6.4' distribution was not found and is required by the application
Type: updatedefect

comment:3 Changed 7 years ago by kencu (Ken)

I am unable to reproduce this. Await the output of the commands above...

comment:4 Changed 7 years ago by zhangcs (Chensong Zhang)

zhangcs@new$ which xattr
/usr/bin/xattr

zhangcs@new$ xattr -h
Traceback (most recent call last):
  File "/usr/bin/xattr-2.7", line 7, in <module>
    from pkg_resources import load_entry_point
  File "/Users/zhangcs/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 3142, in <module>
    @_call_aside
  File "/Users/zhangcs/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 3126, in _call_aside
    f(*args, **kwargs)
  File "/Users/zhangcs/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 3155, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/Users/zhangcs/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 664, in _build_master
    ws.require(__requires__)
  File "/Users/zhangcs/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 981, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/Users/zhangcs/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 867, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'xattr==0.6.4' distribution was not found and is required by the application
Last edited 6 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 Changed 7 years ago by kencu (Ken)

Have you installed your own copy of python separately into your home directory?

xattr is a MacOS command, and yours seems to be broken, possibly by interacting with

"/Users/zhangcs/Library/Python/2.7/lib/python/site-packages/pkg_resources/init.py"

comment:6 in reply to:  5 Changed 7 years ago by zhangcs (Chensong Zhang)

Replying to kencu:

Have you installed your own copy of python separately into your home directory?

xattr is a MacOS command, and yours seems to be broken, possibly by interacting with

"/Users/zhangcs/Library/Python/2.7/lib/python/site-packages/pkg_resources/init.py"

The way I installed my python is:

  1. Install python 2.7 and 3.6 using macport
  1. Install pip and pip3
  1. Install all python packages using pip to my home directory

How can I fix this problem? I now remember llvm-4.0 had the same issue. Thanks a lot!

comment:7 Changed 7 years ago by kencu (Ken)

I'm sure you're not the first one to go down this path. The system (MacOS) should be resilient enough to withstand what you did, but I guess not. I'm unfortunately not a python expert, so the answer is not at the tip of my tongue. I see almost 700 open and closed tickets about python, and no doubt there is wisdom in there somewhere...just finding the right ticket with the answer can be tricky.

For right now, just comment out that offending xattr line in the libtool portfile -- it's not that important -- and that gets libtool installed for you.

For the bigger fix - I don't know. Prospecting the tickets or Google would be my first line of attack. Perhaps one of the MacPorts python experts will chime in with the easy fix for you.

comment:8 Changed 7 years ago by kencu (Ken)

Port: libtool removed
Resolution: invalid
Status: assignedclosed
Summary: libtool @2.4.6: The 'xattr==0.6.4' distribution was not found and is required by the applicationxattr broken by installing packages with pip into home directory: The 'xattr==0.6.4' distribution was not found and is required by the application

comment:9 in reply to:  7 Changed 7 years ago by zhangcs (Chensong Zhang)

OK. Thanks!

Replying to kencu:

I'm sure you're not the first one to go down this path. The system (MacOS) should be resilient enough to withstand what you did, but I guess not. I'm unfortunately not a python expert, so the answer is not at the tip of my tongue. I see almost 700 open and closed tickets about python, and no doubt there is wisdom in there somewhere...just finding the right ticket with the answer can be tricky.

For right now, just comment out that offending xattr line in the libtool portfile -- it's not that important -- and that gets libtool installed for you.

For the bigger fix - I don't know. Prospecting the tickets or Google would be my first line of attack. Perhaps one of the MacPorts python experts will chime in with the easy fix for you.

comment:10 Changed 7 years ago by kencu (Ken)

for a quick fix until you figure out how to untangle Python, I guess you could also make a new user, login as that user, install your stuff with macports, and then go back to your normal user. Ugly, but works.

Note: See TracTickets for help on using tickets.