s4cmd not able to load utils.py for cmp_to_key on python 2.6
TheWebMachine opened this issue · comments
When installing s4cmd on a CentOS 6.5 system with Python 2.6 (required for another application) using pip, the utils.py file is not installed, resulting in an error when running s4cmd because it can't import the cmp_to_key function. If I manually drop a copy of utils.py in /usr/bin (where s4cmd is also placed), s4cmd runs correctly without error.
Traceback (most recent call last):
File "/usr/bin/s4cmd", line 7, in <module>
from s4cmd import main
File "/usr/bin/s4cmd.py", line 43, in <module>
from utils import cmp_to_key
ImportError: No module named utils
How did you install s4cmd? Unsure how it's unable to find utils when utils.py
should be in the same directory as s4cmd.py
. Can you please provide more details of the issue?
Sorry about the delayed response.
As I said, I installed it via pip
. No errors or issues when installing, only the ImportError when trying to run it. Perhaps the PIP repo copy is missing utils.py
somehow?
What other information do you need? I will have to recreate the issue in a new sandbox, as I already dropped in utils.py
and placed that system into production.