-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
s3cmd unable to import Python dependencies #152280
Comments
Yea that's strange, can you paste the following info? Here's what I see: $ head -1 $(which s3cmd)
#!/opt/homebrew/Cellar/s3cmd/2.3.0/libexec/bin/python
$ $(brew --prefix s3cmd)/libexec/bin/python -c 'import dateutil; print(dateutil.__path__)'
['/opt/homebrew/Cellar/s3cmd/2.3.0/libexec/lib/python3.12/site-packages/dateutil']
$ $(brew --prefix s3cmd)/libexec/bin/python -m site
sys.path = [
'/opt/homebrew/Library/Taps/homebrew/homebrew-core',
'/opt/homebrew/Cellar/python@3.12/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python312.zip',
'/opt/homebrew/Cellar/python@3.12/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12',
'/opt/homebrew/Cellar/python@3.12/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/lib-dynload',
'/opt/homebrew/Cellar/s3cmd/2.3.0/libexec/lib/python3.12/site-packages',
'/opt/homebrew/opt/six/lib/python3.12/site-packages',
'/opt/homebrew/lib/python3.12/site-packages',
'/opt/homebrew/Cellar/pybind11/2.11.1/libexec/lib/python3.12/site-packages',
]
USER_BASE: '/Users/branch/Library/Python/3.12' (doesn't exist)
USER_SITE: '/Users/branch/Library/Python/3.12/lib/python/site-packages' (doesn't exist)
ENABLE_USER_SITE: True
|
@branchvincent here's what I get: $ head -1 $(which s3cmd)
#!/opt/homebrew/Cellar/s3cmd/2.3.0/libexec/bin/python
$ $(brew --prefix s3cmd)/libexec/bin/python -c 'import dateutil; print(dateutil.__path__)'
['/opt/homebrew/Cellar/s3cmd/2.3.0/libexec/lib/python3.12/site-packages/dateutil']
$ $(brew --prefix s3cmd)/libexec/bin/python -m site
sys.path = [
'/opt/homebrew/Cellar',
'/opt/homebrew/Cellar/python@3.12/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python312.zip',
'/opt/homebrew/Cellar/python@3.12/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12',
'/opt/homebrew/Cellar/python@3.12/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/lib-dynload',
'/opt/homebrew/Cellar/s3cmd/2.3.0/libexec/lib/python3.12/site-packages',
'/opt/homebrew/opt/six/lib/python3.12/site-packages',
'/opt/homebrew/lib/python3.12/site-packages',
'/opt/homebrew/opt/six/lib/python3.12/site-packages',
'/opt/homebrew/opt/six/lib/python3.12/site-packages',
]
USER_BASE: '/Users/collin/Library/Python/3.12' (doesn't exist)
USER_SITE: '/Users/collin/Library/Python/3.12/lib/python/site-packages' (doesn't exist)
ENABLE_USER_SITE: True The first two outputs are identical to yours, but the last one is a little different. Just to confirm - are you able to reproduce the issue? I'm seeing the same result on two different machines. |
No I can't reproduce, and your output looks fine to me. I mainly wanted to see if The import error you're getting is specifically from $ $(brew --prefix s3cmd)/libexec/bin/python -c 'import dateutil.parser as p; print(p.__path__)'
['/opt/homebrew/Cellar/s3cmd/2.3.0/libexec/lib/python3.12/site-packages/dateutil/parser'] |
I get this error: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/homebrew/Cellar/s3cmd/2.3.0/libexec/lib/python3.12/site-packages/dateutil/parser/__init__.py", line 2, in <module>
from ._parser import parse, parser, parserinfo, ParserError
File "/opt/homebrew/Cellar/s3cmd/2.3.0/libexec/lib/python3.12/site-packages/dateutil/parser/_parser.py", line 43, in <module>
from six import integer_types, text_type
ImportError: cannot import name 'integer_types' from 'six' (unknown location) Edit: I'm not familiar with the Instead, it's |
Interesting, your |
Reinstalled So it looks like if |
this might be the root cause, Homebrew/brew#16152 also relates to #151657 |
Closing as Homebrew/brew#16152 is merged and in release. |
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
outputVerification
brew doctor
output" saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
Attempting to run
s3cmd
produces an error that it is unable to importdateutil.parser
.What happened (include all command output)?
The following error is logged when trying to run
s3cmd
:What did you expect to happen?
Python resources should be installed by the formula. It does appear that
virtualenv
is installing these resources here:/opt/homebrew/Cellar/s3cmd/2.3.0/libexec/lib/python3.12/site-packages/
Both
dateutil
andmagic
can be seen in the filesystem at this location. However, for some reasons3cmd
is unable to import the modules.Step-by-step reproduction instructions (by running
brew
commands)The text was updated successfully, but these errors were encountered: