<br><br><div class="gmail_quote">On Mon, Feb 18, 2013 at 12:42 PM, Monty Taylor <span dir="ltr"><<a href="mailto:mordred@inaugust.com" target="_blank">mordred@inaugust.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
FASCINATING (I was asking because I know that Salvatore had problems<br>
using easy_install)<br>
<br>
I tested by doing:<br>
<br>
pip install<br>
<a href="http://tarballs.openstack.org/oslo-config/oslo-config-2013.1b3.tar.gz#egg=oslo-config" target="_blank">http://tarballs.openstack.org/oslo-config/oslo-config-2013.1b3.tar.gz#egg=oslo-config</a><br>
<br>
and it worked.<br>
<br>
In general - I strongly recommend ALWAYS using pip install over<br>
easy_install. But that doesn't seem to be the real key here.<br>
<br>
Back to the drawing board...<br></blockquote><div><br></div><div>I noticed that "oslo" is not listed among the packages in oslo-config/setup.py. I don't know if that's the problem, but it's different from other projects where I've used namespace packages in the past.</div>
<div><br></div><div>Do we have a reliable way to reproduce the issue?</div><div><br></div><div>Doug</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
On 02/18/2013 09:36 AM, Akihiro MOTOKI wrote:<br>
> HI Monty,<br>
><br>
> I tested the following two ways and both failed.<br>
> - easy_install <a href="http://tarballs.openstack.org/oslo-config/oslo-config-2013.1b3.tar.gz#egg=oslo-config" target="_blank">http://tarballs.openstack.org/oslo-config/oslo-config-2013.1b3.tar.gz#egg=oslo-config</a><br>

> - cd /opt/stack/quantum; pip install -r pip install -r tools/pip-requires<br>
><br>
> Note that pip-requires in quantum has the following line:<br>
> <a href="http://tarballs.openstack.org/oslo-config/oslo-config-2013.1b3.tar.gz#egg=oslo-config" target="_blank">http://tarballs.openstack.org/oslo-config/oslo-config-2013.1b3.tar.gz#egg=oslo-config</a><br>
><br>
> Akihiro<br>
><br>
> 2013/2/19 Salvatore Orlando <<a href="mailto:sorlando@nicira.com">sorlando@nicira.com</a>>:<br>
>> Hi Monty,<br>
>><br>
>> even if I'm not the recipient of your question, I used easy_install<br>
>> when I had this problem.<br>
>><br>
>> Salvatore<br>
>><br>
>> On 18 February 2013 18:21, Monty Taylor <<a href="mailto:mordred@inaugust.com">mordred@inaugust.com</a>> wrote:<br>
>>> Akihiro - did you use easy_install or pip?<br>
>>><br>
>>> On 02/18/2013 09:14 AM, Akihiro MOTOKI wrote:<br>
>>>> I encountered the same problem.<br>
>>>> The solution Salvatore says or python setup.py develop for donwloaded<br>
>>>> oslo-config tarball resolved the problem.<br>
>>>><br>
>>>> In addtion, currios to say, the current oslo config works fine with<br>
>>>> the fresh install of Ubuntu 12.04.<br>
>>>> I confirm it with devstack. This problem seems to occur when quantum<br>
>>>> is updated from the previous version.<br>
>>>><br>
>>>> Thanks,<br>
>>>> Akihiro<br>
>>>><br>
>>>> 2013/2/19 Salvatore Orlando <<a href="mailto:sorlando@nicira.com">sorlando@nicira.com</a>>:<br>
>>>>> Indeed. This what was looking weird to me, and the reason for which I<br>
>>>>> think I'm doing something dumb.<br>
>>>>> Basically there are many quantum imports that do<br>
>>>>><br>
>>>>> from oslo.config import cfg<br>
>>>>><br>
>>>>> and this import fails (on all my 3 dev machines)<br>
>>>>><br>
>>>>> I am providing more details below so you can tell me what I'm not doing right.<br>
>>>>> This is what happens (and my default sys.path which includes oslo's directory):<br>
>>>>><br>
>>>>><br>
>>>>>>>> import sys<br>
>>>>>>>> sys.path<br>
>>>>> ['', '/usr/local/lib/python2.7/dist-packages/alembic-0.4.2-py2.7.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/tox-1.4.2-py2.7.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/py-1.4.12-py2.7.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/virtualenv-1.8.4-py2.7.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/WebOb-1.2.3-py2.7.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/unittest2-0.5.1-py2.7.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/pep8-1.4.2-py2.7.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/netaddr-0.7.10-py2.7.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/mock-1.0.1-py2.7.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/cliff-1.3-py2.7.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/prettytable-0.6.1-py2.7.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/fixtures-0.3.12-py2.7.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/testtools-0.9.29-py2.7.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/extras-0.0.3-py2.7.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/openstack.common-2013.1.a172.g8ce5947-py2.7.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/SQLAlchemy-0.7.9-py2.7-linux-x86_64.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/stevedore-0.8-py2.7.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/kombu-1.0.4-py2.7.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/anyjson-0.2.4-py2.7.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/greenlet-0.4.0-py2.7-linux-x86_64.egg',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages/oslo_config-2013.1b3-py2.7.egg',<br>
>>>>> '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2',<br>
>>>>> '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old',<br>
>>>>> '/usr/lib/python2.7/lib-dynload',<br>
>>>>> '/usr/local/lib/python2.7/dist-packages',<br>
>>>>> '/usr/lib/python2.7/dist-packages',<br>
>>>>> '/usr/lib/python2.7/dist-packages/PIL',<br>
>>>>> '/usr/lib/python2.7/dist-packages/gst-0.10',<br>
>>>>> '/usr/lib/python2.7/dist-packages/gtk-2.0',<br>
>>>>> '/usr/lib/pymodules/python2.7',<br>
>>>>> '/usr/lib/python2.7/dist-packages/ubuntu-sso-client',<br>
>>>>> '/usr/lib/python2.7/dist-packages/ubuntuone-client',<br>
>>>>> '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel',<br>
>>>>> '/usr/lib/python2.7/dist-packages/ubuntuone-couch',<br>
>>>>> '/usr/lib/python2.7/dist-packages/ubuntuone-installer',<br>
>>>>> '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol']<br>
>>>>>>>> from oslo.config import cfg as config<br>
>>>>> Traceback (most recent call last):<br>
>>>>>   File "<stdin>", line 1, in <module><br>
>>>>> ImportError: No module named oslo.config<br>
>>>>>>>> quit()<br>
>>>>><br>
>>>>><br>
>>>>> Then I do the following, probably horrible thing:<br>
>>>>><br>
>>>>> salvatore@ubuntu:~$ sudo touch<br>
>>>>> /usr/local/lib/python2.7/dist-packages/oslo_config-2013.1b3-py2.7.egg/oslo/__init__.py<br>
>>>>><br>
>>>>> And the import works<br>
>>>>><br>
>>>>> salvatore@ubuntu:~$ python<br>
>>>>> Python 2.7.3 (default, Aug  1 2012, 05:14:39)<br>
>>>>> [GCC 4.6.3] on linux2<br>
>>>>> Type "help", "copyright", "credits" or "license" for more information.<br>
>>>>>>>> from oslo.config import cfg as config<br>
>>>>>>>> type(config.CONF)<br>
>>>>> <class 'oslo.config.cfg.ConfigOpts'><br>
>>>>>>>><br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> On 18 February 2013 16:19, Doug Hellmann <<a href="mailto:doug.hellmann@dreamhost.com">doug.hellmann@dreamhost.com</a>> wrote:<br>
>>>>>> On Mon, Feb 18, 2013 at 8:58 AM, Salvatore Orlando <<a href="mailto:sorlando@nicira.com">sorlando@nicira.com</a>><br>
>>>>>> wrote:<br>
>>>>>>><br>
>>>>>>> Hi,<br>
>>>>>>><br>
>>>>>>> After updating my Quantum code with the one which uses oslo as a<br>
>>>>>>> dependency, making the source tree incredibly slimmer, I saw Quantum<br>
>>>>>>> was still failing in importing oslo, even if it was correctly in the<br>
>>>>>>> pip-requires (and I did re-install the package).<br>
>>>>>>><br>
>>>>>>> Oslo also showed up correctly in<br>
>>>>>>> /usr/local/lib/python2.7/dist-packages/oslo_config-2013.1b3-py2.7.egg<br>
>>>>>>> I wondered why the import was failing and I found no __init__.py in<br>
>>>>>>> the oslo folder. This was easily fixed, but I am still not able to<br>
>>>>>>> understand what I did wrong (I just did sudo easy_install<br>
>>>>>>> <tarball_url>), since everything looks fine in the tarball.<br>
>>>>>><br>
>>>>>><br>
>>>>>> Oslo is a namespace package, so it shouldn't be imported directly and<br>
>>>>>> doesn't need an __init__.py.<br>
>>>>>><br>
>>>>>> What import was failing and what was the traceback?<br>
>>>>>><br>
>>>>>> Doug<br>
>>>>>><br>
>>>>>>><br>
>>>>>>><br>
>>>>>>> Regards, and thanks in advance,<br>
>>>>>>> Salvatore<br>
>>>>>>><br>
>>>>>>> _______________________________________________<br>
>>>>>>> OpenStack-dev mailing list<br>
>>>>>>> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
>>>>>>> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> _______________________________________________<br>
>>>>>> OpenStack-dev mailing list<br>
>>>>>> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
>>>>>> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
>>>>>><br>
>>>>><br>
>>>>> _______________________________________________<br>
>>>>> OpenStack-dev mailing list<br>
>>>>> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
>>>>> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
>>>><br>
>>>><br>
>>>><br>
>>><br>
>>> _______________________________________________<br>
>>> OpenStack-dev mailing list<br>
>>> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
>>> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
>><br>
>> _______________________________________________<br>
>> OpenStack-dev mailing list<br>
>> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
>> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
><br>
><br>
><br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</div></div></blockquote></div><br>