Le mardi 13 mai 2014, 07:31:34 Doug Hellmann a écrit : > Since we think we have been able to solve all of the issues we were > having with namespace packages before, ...
I just tried to start my DevStack and again, I had issues with a "builtin" olso module: "import oslo.config" doesn't work, whereas olso.config was installed (system wide) by pip. "pip list|grep olso" told me that oslo.config, oslo.messaging, oslo.rootwrap and oslo.vmware are installed. My workaround is to uninstall all olso modules: sudo pip uninstall oslo.config oslo.messaging oslo.rootwrap oslo.vmware ./stack.sh reinstalls them and now it works. -- Current state: haypo@devstackdev$ pip list|grep oslo oslo.config (1.3.0a0.40.gb347519) oslo.messaging (1.3.0.8.gc0c8557) oslo.rootwrap (1.2.0) oslo.vmware (0.3.1.g49097c0) haypo@devstackdev$ python Python 2.7.5 (default, Feb 19 2014, 13:47:28) [GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import oslo >>> oslo <module 'oslo' (built-in)> >>> import oslo.config >>> import oslo.messaging >>> import oslo.rootwrap >>> import oslo.vmware I never understood how these .pth files work. haypo@devstackdev$ cd /usr/lib/python2.7/site-packages haypo@devstackdev$ ls oslo*.pth -1 oslo.config-1.3.0a0.40.gb347519-py2.7-nspkg.pth oslo.messaging-1.3.0.8.gc0c8557-py2.7-nspkg.pth oslo.rootwrap-1.2.0-py2.7-nspkg.pth oslo.vmware-0.3.1.g49097c0-py2.7-nspkg.pth haypo@devstackdev$ md5sum oslo*.pth 002fd4bf040a30d396d4df8e1ed378a8 oslo.config-1.3.0a0.40.gb347519-py2.7- nspkg.pth 002fd4bf040a30d396d4df8e1ed378a8 oslo.messaging-1.3.0.8.gc0c8557-py2.7- nspkg.pth 002fd4bf040a30d396d4df8e1ed378a8 oslo.rootwrap-1.2.0-py2.7-nspkg.pth 002fd4bf040a30d396d4df8e1ed378a8 oslo.vmware-0.3.1.g49097c0-py2.7-nspkg.pth haypo@devstackdev$ cat oslo.config-1.3.0a0.40.gb347519-py2.7-nspkg.pth import sys,types,os; p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('oslo',)); ie = os.path.exists(os.path.join(p,'__init__.py')); m = not ie and sys.modules.setdefault('oslo',types.ModuleType('oslo')); mp = (m or []) and m.__dict__.setdefault('__path__',[]); (p not in mp) and mp.append(p) Victor _______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev