-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: no module named mac #68
Comments
Likely an issue related to d37197c although there should not be issues... I recommend trying the |
This should be good now, I needed to update the |
After a pull and install (again a successful build, that despite using what I think is the master branch, bills itself as 1.8.1b0), I do not see the previous problem, but now get this one:
Traceback (most recent call last):
File "/Users/larryy/Dropbox/src/file_rename.py", line 8, in <module>
from send2trash import send2trash
File "/usr/local/lib/python2.7/site-packages/send2trash/__init__.py", line 12, in <module>
from send2trash.mac import send2trash
File "/usr/local/lib/python2.7/site-packages/send2trash/mac/__init__.py", line 20, in <module>
from send2trash.mac.legacy import send2trash # noqa: F401
File "/usr/local/lib/python2.7/site-packages/send2trash/mac/legacy.py", line 18, in <module>
GetMacOSStatusCommentString = Foundation.GetMacOSStatusCommentString
File ***@***.***/2.7.17/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 379, in __getattr__
func = self.__getitem__(name)
File ***@***.***/2.7.17/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 384, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, GetMacOSStatusCommentString): symbol not found
|
Yeah, I think you are running into a previous issue #51 that has a fix for newer python versions. This issue is due to a change in newer macOS versions. |
I'm sorry to report that "fix" doesn't help. I installed the latest stable releases for both Python 3 (3.9.13) and Python 2 (2.7.18), reinstalled send2trash, and am getting the same error. The only customizable options were certain packages, which were all on by default and I left them on, and the install location, which I left at the default. I confirmed that Python 2 was updated from 2.7.17 to 2.7.18. I don't know what version Python 3 was at before this install, but it is now at 3.9.13.
I don't think it's meaningful, but I noticed a complaint from the send2trash install about the target site-packages not being in my PATH, and sure enough I still had an old /System/Library path instead of the current /Library path. But fixing this seems to have changed nothing except that paths reported in the error message are now the Framework paths rather than the /usr/local/lib paths. The files being pointed to are the same files, just reachable by these two different paths due to symbolic linking.
Traceback (most recent call last):
File "/Users/larryy/Dropbox/src/file_rename.py", line 8, in <module>
from send2trash import send2trash
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/send2trash/__init__.py", line 12, in <module>
from send2trash.mac import send2trash
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/send2trash/mac/__init__.py", line 20, in <module>
from send2trash.mac.legacy import send2trash # noqa: F401
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/send2trash/mac/legacy.py", line 18, in <module>
GetMacOSStatusCommentString = Foundation.GetMacOSStatusCommentString
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 379, in __getattr__
func = self.__getitem__(name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 384, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, GetMacOSStatusCommentString): symbol not found
|
Yeah, I don't really have anything else then, installing python 3.9.2 back when I was first troubleshooting the |
After cloning the directory, entering it, and typing 'pip install .' I got what seemed to be a successful build and install, ending in:
But when I try to run my Python 2.7 script I get an error message:
As shown, the line of code in question is a standard import:
This is macOS Monterey 12.4 (latest) and the latest Send2Trash (1.8.1b0). Apologies if I've just done something stupid setting things up.
The text was updated successfully, but these errors were encountered: