Skip to content
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 wrapt #570

Open
rcpeters opened this issue Aug 28, 2015 · 7 comments
Open

ImportError: No module named wrapt #570

rcpeters opened this issue Aug 28, 2015 · 7 comments

Comments

@rcpeters
Copy link

See example from Ubuntu 14.04

             lsb_release -a
             No LSB modules are available.
             Distributor ID:    Ubuntu
             Description:   Ubuntu 14.04.3 LTS
             Release:   14.04
             Codename:  trusty


             python --version
             Python 2.7.6


             sudo pip install --upgrade pyrax
             Requirement already up-to-date: pyrax in /usr/local/lib/python2.7/dist-packages
             Cleaning up...


             echo "import pyrax
             >                  " | python
             Traceback (most recent call last):
               File "<stdin>", line 1, in <module>
               File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 58, in <module>
                 from novaclient import auth_plugin as _cs_auth_plugin
               File "/usr/local/lib/python2.7/dist-packages/novaclient/auth_plugin.py", line 23, in <module>
                 from novaclient import utils
               File "/usr/local/lib/python2.7/dist-packages/novaclient/utils.py", line 21, in <module>
                 from oslo_serialization import jsonutils
               File "/usr/local/lib/python2.7/dist-packages/oslo_serialization/jsonutils.py", line 60, in <module>
                 from oslo_utils import timeutils
               File "/usr/local/lib/python2.7/dist-packages/oslo_utils/timeutils.py", line 24, in <module>
                 from debtcollector import removals
               File "/usr/local/lib/python2.7/dist-packages/debtcollector/removals.py", line 19, in <module>
                 import wrapt
             ImportError: No module named wrapt
@briancurtin
Copy link
Contributor

Does pip install wrapt work?

It's kind of odd that wouldn't be working for you, and I've never seen this before, but that's a dependency four levels below pyrax.

@rcpeters
Copy link
Author

   pip install wrapt
   pip install monotonic
   pip install netifaces

Works.

@wbond
Copy link

wbond commented Jan 15, 2016

I have also experienced this issue.

jasondunsmore added a commit to jasondunsmore/base-image-blueprints that referenced this issue May 23, 2016
For some reason, these aren't being pulled in by pip.  Here are the dependencies of the packages that aren't being pulled in:

```
os-collect-config -> oslo.config -> debtcollector -> [ wrapt, funcsigs ]
os-collect-config -> oslo.utils -> [ monotonic, pytz ]
os-collect-config -> python-keystoneclient -> positional
```

Not sure if we want to fix it like this or continue searching for the root cause.

I've verified this fix works in heat-ci:
https://github.com/rackerlabs/heat-ci/commit/65376562

I've found a pyrax bug report about this:
pycontribs/pyrax#570
jasondunsmore added a commit to jasondunsmore/base-image-blueprints that referenced this issue May 24, 2016
For some reason, these aren't being pulled in by pip.  Here are the dependencies of the packages that aren't being pulled in:

```
os-collect-config -> oslo.config -> debtcollector -> [ wrapt, funcsigs ]
os-collect-config -> oslo.utils -> [ monotonic, pytz ]
os-collect-config -> python-keystoneclient -> positional
```

I've verified this fix works in heat-ci:
https://github.com/rackerlabs/heat-ci/commit/65376562

I've found a pyrax bug report about this:
pycontribs/pyrax#570
jasondunsmore added a commit to jasondunsmore/base-image-blueprints that referenced this issue May 24, 2016
For some reason, these aren't being pulled in by pip.  Here are the dependencies of the packages that aren't being pulled in:

```
os-collect-config -> oslo.config -> debtcollector -> [ wrapt, funcsigs ]
os-collect-config -> oslo.utils -> [ monotonic, pytz ]
os-collect-config -> python-keystoneclient -> positional
```

I've verified this fix works in heat-ci:
https://github.com/rackerlabs/heat-ci/commit/65376562

I've found a pyrax bug report about this:
pycontribs/pyrax#570
@tob4bot
Copy link

tob4bot commented Aug 14, 2019

you may have installed wrapt with sudo. Try installing the packages for user like pip install wrapt --user

@kkairu
Copy link

kkairu commented Jan 26, 2020

This works just fine...
conda install wrapt

@Chidvilas-Karpenahalli-Ramakrishna

Usually you will get a specific version of wrapt conflict. For example
ERROR: astroid 2.3.3 has requirement wrapt==1.11.*, but you'll have wrapt 1.12.1 which is incompatible.
So, identify this and install specific version mentioned. In my case as stated above I had the latest 1.12.1 version which was not compatible with astroid 2.3.3 so I did
conda install -c conda-forge wrapt=1.11 and it works.

@MH-B
Copy link

MH-B commented Oct 14, 2021

I don't know if it helps or not, but I had this problem in colab and fixed by installing the tensorflow-gpu=1.15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants