Re: [openstack-dev] [Neutron] ImportError: No module named neutron_lib

2017-03-09 Thread Doug Hellmann
Excerpts from Sam's message of 2017-03-09 14:33:11 +0800:
> Sorry, it's oslo_db, I'm wrong

The "Drop our use of namespace packages" spec explains why.

http://specs.openstack.org/openstack/oslo-specs/specs/kilo/drop-namespace-packages.html

Doug

> 
> 2017-03-09 14:22 GMT+08:00 Sam :
> 
> > I found this:
> >
> > from oslo_config import ...
> > from oslo_db import ...
> > from neutron_lib import ...
> >
> > actually these libraries is oslo.config, oslo.db, neutron.lib
> >
> > Why not write like this: from oslo.config import ... ?
> >
> > And for local package, its: from neutron.api import ...
> >
> > WHY ?
> >
> > 2017-03-08 5:28 GMT+08:00 Tony Breeds :
> >
> >> On Tue, Mar 07, 2017 at 04:04:55PM +0800, Sam wrote:
> >> > Is this?
> >> >
> >> > https://pypi.python.org/pypi/neutron-lib
> >>
> >> Make sure you're installing with upper-constratints otehrwise you'll get
> >> components that rely on features for newer releases
> >>
> >> Assuming you're installing with pip something like[1]
> >>
> >> wget 'http://tarballs.openstack.org/neutron/neutron-8.4.0-py2.py3
> >> -none-any.whl'
> >> wget 'http://git.openstack.org/cgit/openstack/requirements/plain/
> >> upper-constraints.txt?h=stable/mitaka'
> >>
> >> pip install -c upper-constratints.txt ./neutron-8.4.0-py2.py3-none-a
> >> ny.whl
> >>
> >> Should get you a stable/mitaka neutron with appropriate versions of all
> >> libraries in use.
> >>
> >> Yours Tony.
> >>
> >> [1] You may be able to pass the URLs directly to pip but I haven't tested
> >> that for wheels
> >>
> >> 
> >> __
> >> OpenStack Development Mailing List (not for usage questions)
> >> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscrib
> >> e
> >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >>
> >>
> >

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Neutron] ImportError: No module named neutron_lib

2017-03-08 Thread Sam
Sorry, it's oslo_db, I'm wrong

2017-03-09 14:22 GMT+08:00 Sam :

> I found this:
>
> from oslo_config import ...
> from oslo_db import ...
> from neutron_lib import ...
>
> actually these libraries is oslo.config, oslo.db, neutron.lib
>
> Why not write like this: from oslo.config import ... ?
>
> And for local package, its: from neutron.api import ...
>
> WHY ?
>
> 2017-03-08 5:28 GMT+08:00 Tony Breeds :
>
>> On Tue, Mar 07, 2017 at 04:04:55PM +0800, Sam wrote:
>> > Is this?
>> >
>> > https://pypi.python.org/pypi/neutron-lib
>>
>> Make sure you're installing with upper-constratints otehrwise you'll get
>> components that rely on features for newer releases
>>
>> Assuming you're installing with pip something like[1]
>>
>> wget 'http://tarballs.openstack.org/neutron/neutron-8.4.0-py2.py3
>> -none-any.whl'
>> wget 'http://git.openstack.org/cgit/openstack/requirements/plain/
>> upper-constraints.txt?h=stable/mitaka'
>>
>> pip install -c upper-constratints.txt ./neutron-8.4.0-py2.py3-none-a
>> ny.whl
>>
>> Should get you a stable/mitaka neutron with appropriate versions of all
>> libraries in use.
>>
>> Yours Tony.
>>
>> [1] You may be able to pass the URLs directly to pip but I haven't tested
>> that for wheels
>>
>> 
>> __
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscrib
>> e
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Neutron] ImportError: No module named neutron_lib

2017-03-08 Thread Sam
I found this:

from oslo_config import ...
from oslo_db import ...
from neutron_lib import ...

actually these libraries is oslo.config, oslo.db, neutron.lib

Why not write like this: from oslo.config import ... ?

And for local package, its: from neutron.api import ...

WHY ?

2017-03-08 5:28 GMT+08:00 Tony Breeds :

> On Tue, Mar 07, 2017 at 04:04:55PM +0800, Sam wrote:
> > Is this?
> >
> > https://pypi.python.org/pypi/neutron-lib
>
> Make sure you're installing with upper-constratints otehrwise you'll get
> components that rely on features for newer releases
>
> Assuming you're installing with pip something like[1]
>
> wget 'http://tarballs.openstack.org/neutron/neutron-8.4.0-py2.
> py3-none-any.whl'
> wget 'http://git.openstack.org/cgit/openstack/requirements/
> plain/upper-constraints.txt?h=stable/mitaka'
>
> pip install -c upper-constratints.txt ./neutron-8.4.0-py2.py3-none-any.whl
>
> Should get you a stable/mitaka neutron with appropriate versions of all
> libraries in use.
>
> Yours Tony.
>
> [1] You may be able to pass the URLs directly to pip but I haven't tested
> that for wheels
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Neutron] ImportError: No module named neutron_lib

2017-03-07 Thread Tony Breeds
On Tue, Mar 07, 2017 at 04:04:55PM +0800, Sam wrote:
> Is this?
> 
> https://pypi.python.org/pypi/neutron-lib

Make sure you're installing with upper-constratints otehrwise you'll get
components that rely on features for newer releases

Assuming you're installing with pip something like[1]

wget 'http://tarballs.openstack.org/neutron/neutron-8.4.0-py2.py3-none-any.whl'
wget 
'http://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/mitaka'

pip install -c upper-constratints.txt ./neutron-8.4.0-py2.py3-none-any.whl

Should get you a stable/mitaka neutron with appropriate versions of all
libraries in use.

Yours Tony.

[1] You may be able to pass the URLs directly to pip but I haven't tested that 
for wheels


signature.asc
Description: PGP signature
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Neutron] ImportError: No module named neutron_lib

2017-03-07 Thread Neil Jerram
Hi Sam,

On Tue, Mar 7, 2017 at 8:05 AM Sam  wrote:

> Is this?
>
> https://pypi.python.org/pypi/neutron-lib
>

Yes, that is one of the ways that neutron-lib is packaged.  The 'upstream'
is at http://git.openstack.org/cgit/openstack/neutron-lib.

Exactly how are you using the Neutron code?  If you are starting from a git
clone and running Neutron code/tests on your own machine, you should
normally do that within one of the virtual environments that is set up by
'tox', and that process would pull in the neutron-lib code for you.

Best wishes,
 Neil



>
> 2017-03-07 15:48 GMT+08:00 Sam :
>
> Hi,
>
> I'm using neutron mitaka version, I found lots of files include this:
> "from neutron_lib import exceptions as e"
> But I don't find where is neutron_lib, and I got error as "ImportError: No
> module named neutron_lib"
>
> Is there some error?
>
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Neutron] ImportError: No module named neutron_lib

2017-03-07 Thread Sam
Is this?

https://pypi.python.org/pypi/neutron-lib

2017-03-07 15:48 GMT+08:00 Sam :

> Hi,
>
> I'm using neutron mitaka version, I found lots of files include this:
> "from neutron_lib import exceptions as e"
> But I don't find where is neutron_lib, and I got error as "ImportError: No
> module named neutron_lib"
>
> Is there some error?
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [Neutron] ImportError: No module named neutron_lib

2017-03-06 Thread Sam
Hi,

I'm using neutron mitaka version, I found lots of files include this:
"from neutron_lib import exceptions as e"
But I don't find where is neutron_lib, and I got error as "ImportError: No
module named neutron_lib"

Is there some error?
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev