Ask Your Question

Python Utils module is missing

asked 2016-01-04 14:57:58 +0000

I use docker-compose to run a set of Docker containers. This app requires a Python module which I can't find in Fedora's repositories. See the error message from the app:

File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 58, in <module>    
    from . import utils 
ImportError: cannot import name utils

To make it work, I have to use pip to install the module, but it's not desirable, because then I can't use the Fedora's update mechanism.

Question: Does the package exists with a different name? This there a way to vote for this package to be inclided in the Fedora repositories?

edit retag flag offensive close merge delete


The syntax "from . means from here - the requests module is attempting to load resources it provides from a relative path. docker-compose is only attempting to use the requests module. I see this too:

requests]$ grep -r "from . import utils" ./
./__init__.py:from . import utils

And I do have that file:

requests]$ rpm -qf /usr/lib/python2.7/site-packages/requests/utils.py

It would appear that your installation of python-requests is broken, try reinstalling the package.

randomuser ( 2016-01-05 14:41:47 +0000 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-08-12 20:46:18 +0000

Robb gravatar image

Seem you are missing python util package

$ sudo pip install utils

should work for you

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question Tools

1 follower


Asked: 2016-01-04 14:57:58 +0000

Seen: 706 times

Last updated: Aug 12 '17