grok 1.4 I can't import netsnmp

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

grok 1.4 I can't import netsnmp

3sso
I need to build web-app for check my network device by snmp (oid)

I try my script on shell command it ok (it need import netsnmp)

but on Grok got error if import netsnmp in app.py

(in my case cant start paster serve it show error about netsnmp module)


please help

regard
Reply | Threaded
Open this post in threaded view
|

Re: grok 1.4 I can't import netsnmp

Christian Klinger
Hi,

can you paste the traceback of the error you recive during startup?

Christian

>
> I need to build web-app for check my network device by snmp (oid)
>
> I try my script on shell command it ok (it need import netsnmp)
>
> but on Grok got error if import netsnmp in app.py
>
> (in my case cant start paster serve it show error about netsnmp module)
>
>
> please help
>
> regard


_______________________________________________
Grok-dev mailing list
[hidden email]
https://mail.zope.org/mailman/listinfo/grok-dev
Reply | Threaded
Open this post in threaded view
|

Re: grok 1.4 I can't import netsnmp

Owen Shepherd-2
In reply to this post by 3sso
You need to add 'netsnmp' to the dependencies listed in your app's
setup.py and re-run bin/buildout. Grok uses an isolated Python environment


On 25/06/2011 21:12, "3sso" <[hidden email]> wrote:

>
>I need to build web-app for check my network device by snmp (oid)
>
>I try my script on shell command it ok (it need import netsnmp)
>
>but on Grok got error if import netsnmp in app.py
>
>(in my case cant start paster serve it show error about netsnmp module)
>
>
>please help
>
>regard

-- Owen Shepherd
http://www.owenshepherd.net
[hidden email] (general) / [hidden email] (academic)




_______________________________________________
Grok-dev mailing list
[hidden email]
https://mail.zope.org/mailman/listinfo/grok-dev
Reply | Threaded
Open this post in threaded view
|

Re: grok 1.4 I can't import netsnmp

Christian Klinger
Hi,

can you point me to the netsmnp package on pypi. Do you mean
this one: http://pypi.python.org/pypi/DLNetSNMP/0.4.1?

I guess your problem is a wrong package name.

Christian

> You need to add 'netsnmp' to the dependencies listed in your app's
> setup.py and re-run bin/buildout. Grok uses an isolated Python environment
>
>
> On 25/06/2011 21:12, "3sso"<[hidden email]>  wrote:
>
>>
>> I need to build web-app for check my network device by snmp (oid)
>>
>> I try my script on shell command it ok (it need import netsnmp)
>>
>> but on Grok got error if import netsnmp in app.py
>>
>> (in my case cant start paster serve it show error about netsnmp module)
>>
>>
>> please help
>>
>> regard
>
> -- Owen Shepherd
> http://www.owenshepherd.net
> [hidden email] (general) / [hidden email] (academic)


_______________________________________________
Grok-dev mailing list
[hidden email]
https://mail.zope.org/mailman/listinfo/grok-dev
Reply | Threaded
Open this post in threaded view
|

Re: grok 1.4 I can't import netsnmp

3sso
In reply to this post by Christian Klinger
Owen Shepherd say I can add 'netsnmp' to setup.py

I did it but still error

now I dont sure what real package name for it (maybe pysnmp)

at interpreter mode on ubuntu (run script on shell) it work with

import snmp <<

sample code

result = netsnmp.snmpget(oid + str(int(v)+i), Version=2, DestHost="10.255.105.10", Community="public")

----------------------

the error is

2011-06-27 05:53:57,011 WARNING [root] Developer mode is enabled: this is a security risk and should NOT be enabled on production servers. Developer mode can usually be turned off by setting the `devmode` option to `off` or by removing it from the instance configuration file completely.
2011-06-27 05:53:57,587 WARNING [ZODB.blob] (9327) Blob dir /home/takz/zte/var/blobstorage/ has insecure mode setting
Starting server in PID 9327.
serving on http://192.168.20.113:8080
192.168.20.48 - - [27/Jun/2011:05:54:15 +0700] "GET / HTTP/1.1" 401 46 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.797.0 Safari/535.1"
192.168.20.48 - - [27/Jun/2011:05:54:21 +0700] "GET / HTTP/1.1" 303 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.797.0 Safari/535.1"
192.168.20.48 - - [27/Jun/2011:05:54:21 +0700] "GET /%2B%2Bgrokui%2B%2B/%40%40applications HTTP/1.1" 200 2445 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.797.0 Safari/535.1"
2011-06-27 05:54:23,854 ERROR [SiteError] http://192.168.20.113:8080/zte/@@index
Traceback (most recent call last):
  File "/home/takz/.buildout/eggs/zope.publisher-3.12.6-py2.7.egg/zope/publisher/publish.py", line 132, in publish
    result = publication.callObject(request, obj)
  File "/home/takz/.buildout/eggs/grokcore.view-2.5-py2.7.egg/grokcore/view/publication.py", line 56, in callObject
    return super(ZopePublicationSansProxy, self).callObject(request, ob)
  File "/home/takz/.buildout/eggs/zope.app.publication-3.13.1-py2.7.egg/zope/app/publication/zopepublication.py", line 207, in callObject
    return mapply(ob, request.getPositionalArguments(), request)
  File "/home/takz/.buildout/eggs/zope.publisher-3.12.6-py2.7.egg/zope/publisher/publish.py", line 107, in mapply
    return debug_call(obj, args)
  File "/home/takz/.buildout/eggs/zope.publisher-3.12.6-py2.7.egg/zope/publisher/publish.py", line 113, in debug_call
    return obj(*args)
  File "/home/takz/.buildout/eggs/grokcore.view-2.5-py2.7.egg/grokcore/view/components.py", line 139, in __call__
    return self._render_template()
  File "/home/takz/.buildout/eggs/grokcore.view-2.5-py2.7.egg/grokcore/view/components.py", line 143, in _render_template
    return self.template.render(self)
  File "/home/takz/.buildout/eggs/grokcore.view-2.5-py2.7.egg/grokcore/view/components.py", line 316, in render
    return template.pt_render(namespace)
  File "/home/takz/.buildout/eggs/zope.pagetemplate-3.5.2-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 113, in pt_render
    strictinsert=0, sourceAnnotations=sourceAnnotations)()
  File "/home/takz/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 271, in __call__
    self.interpret(self.program)
  File "/home/takz/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 343, in interpret
    handlers[opcode](self, args)
  File "/home/takz/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 819, in do_loop_tal
    iterator = self.engine.setRepeat(name, expr)
  File "/home/takz/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/tales.py", line 682, in setRepeat
    expr = self.evaluate(expr)
  File "/home/takz/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/tales.py", line 696, in evaluate
    return expression(self)
  File "/home/takz/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/pythonexpr.py", line 59, in __call__
    return eval(self._code, vars)
  File "<string>", line 1, in <module>
  File "/home/takz/zte/src/zte/app.py", line 14, in showstatall
    result = netsnmp.snmpget(oid + str(int(v)+i), Version=2, DestHost="10.255.105.10", Community="public")
NameError: global name 'netsnmp' is not defined





Christian Klinger wrote
Hi,

can you paste the traceback of the error you recive during startup?

Christian
>
> I need to build web-app for check my network device by snmp (oid)
>
> I try my script on shell command it ok (it need import netsnmp)
>
> but on Grok got error if import netsnmp in app.py
>
> (in my case cant start paster serve it show error about netsnmp module)
>
>
> please help
>
> regard


_______________________________________________
Grok-dev mailing list
Grok-dev@zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
Reply | Threaded
Open this post in threaded view
|

Re: grok 1.4 I can't import netsnmp

Christian Klinger
Hi,

i guess netsmnp is not available via pypi. I think you have to install
this package in your environment. The installation process is decribed
here. If it's the right package?

https://net-snmp.svn.sourceforge.net/svnroot/net-snmp/trunk/net-snmp/python/README

HTH Christian


>
> Owen Shepherd say I can add 'netsnmp' to setup.py
>
> I did it but still error
>
> now I dont sure what real package name for it (maybe pysnmp)
>
> at interpreter mode on ubuntu (run script on shell) it work with
>
> import snmp<<
>
> sample code
>
> result = netsnmp.snmpget(oid + str(int(v)+i), Version=2,
> DestHost="10.255.105.10", Community="public")
>
> ----------------------
>
> the error is
>
> 2011-06-27 05:53:57,011 WARNING [root] Developer mode is enabled: this is a
> security risk and should NOT be enabled on production servers. Developer
> mode can usually be turned off by setting the `devmode` option to `off` or
> by removing it from the instance configuration file completely.
> 2011-06-27 05:53:57,587 WARNING [ZODB.blob] (9327) Blob dir
> /home/takz/zte/var/blobstorage/ has insecure mode setting
> Starting server in PID 9327.
> serving on http://192.168.20.113:8080
> 192.168.20.48 - - [27/Jun/2011:05:54:15 +0700] "GET / HTTP/1.1" 401 46 "-"
> "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko)
> Chrome/14.0.797.0 Safari/535.1"
> 192.168.20.48 - - [27/Jun/2011:05:54:21 +0700] "GET / HTTP/1.1" 303 0 "-"
> "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko)
> Chrome/14.0.797.0 Safari/535.1"
> 192.168.20.48 - - [27/Jun/2011:05:54:21 +0700] "GET
> /%2B%2Bgrokui%2B%2B/%40%40applications HTTP/1.1" 200 2445 "-" "Mozilla/5.0
> (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko)
> Chrome/14.0.797.0 Safari/535.1"
> 2011-06-27 05:54:23,854 ERROR [SiteError]
> http://192.168.20.113:8080/zte/@@index
> Traceback (most recent call last):
>    File
> "/home/takz/.buildout/eggs/zope.publisher-3.12.6-py2.7.egg/zope/publisher/publish.py",
> line 132, in publish
>      result = publication.callObject(request, obj)
>    File
> "/home/takz/.buildout/eggs/grokcore.view-2.5-py2.7.egg/grokcore/view/publication.py",
> line 56, in callObject
>      return super(ZopePublicationSansProxy, self).callObject(request, ob)
>    File
> "/home/takz/.buildout/eggs/zope.app.publication-3.13.1-py2.7.egg/zope/app/publication/zopepublication.py",
> line 207, in callObject
>      return mapply(ob, request.getPositionalArguments(), request)
>    File
> "/home/takz/.buildout/eggs/zope.publisher-3.12.6-py2.7.egg/zope/publisher/publish.py",
> line 107, in mapply
>      return debug_call(obj, args)
>    File
> "/home/takz/.buildout/eggs/zope.publisher-3.12.6-py2.7.egg/zope/publisher/publish.py",
> line 113, in debug_call
>      return obj(*args)
>    File
> "/home/takz/.buildout/eggs/grokcore.view-2.5-py2.7.egg/grokcore/view/components.py",
> line 139, in __call__
>      return self._render_template()
>    File
> "/home/takz/.buildout/eggs/grokcore.view-2.5-py2.7.egg/grokcore/view/components.py",
> line 143, in _render_template
>      return self.template.render(self)
>    File
> "/home/takz/.buildout/eggs/grokcore.view-2.5-py2.7.egg/grokcore/view/components.py",
> line 316, in render
>      return template.pt_render(namespace)
>    File
> "/home/takz/.buildout/eggs/zope.pagetemplate-3.5.2-py2.7.egg/zope/pagetemplate/pagetemplate.py",
> line 113, in pt_render
>      strictinsert=0, sourceAnnotations=sourceAnnotations)()
>    File
> "/home/takz/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py",
> line 271, in __call__
>      self.interpret(self.program)
>    File
> "/home/takz/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py",
> line 343, in interpret
>      handlers[opcode](self, args)
>    File
> "/home/takz/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py",
> line 819, in do_loop_tal
>      iterator = self.engine.setRepeat(name, expr)
>    File
> "/home/takz/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/tales.py",
> line 682, in setRepeat
>      expr = self.evaluate(expr)
>    File
> "/home/takz/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/tales.py",
> line 696, in evaluate
>      return expression(self)
>    File
> "/home/takz/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/pythonexpr.py",
> line 59, in __call__
>      return eval(self._code, vars)
>    File "<string>", line 1, in<module>
>    File "/home/takz/zte/src/zte/app.py", line 14, in showstatall
>      result = netsnmp.snmpget(oid + str(int(v)+i), Version=2,
> DestHost="10.255.105.10", Community="public")
> NameError: global name 'netsnmp' is not defined
>
>
>
>
>
>
> Christian Klinger wrote:
>>
>> Hi,
>>
>> can you paste the traceback of the error you recive during startup?
>>
>> Christian
>>>
>>> I need to build web-app for check my network device by snmp (oid)
>>>
>>> I try my script on shell command it ok (it need import netsnmp)
>>>
>>> but on Grok got error if import netsnmp in app.py
>>>
>>> (in my case cant start paster serve it show error about netsnmp module)
>>>
>>>
>>> please help
>>>
>>> regard
>>
>>
>> _______________________________________________
>> Grok-dev mailing list
>> [hidden email]
>> https://mail.zope.org/mailman/listinfo/grok-dev
>>
>>
>


_______________________________________________
Grok-dev mailing list
[hidden email]
https://mail.zope.org/mailman/listinfo/grok-dev
Reply | Threaded
Open this post in threaded view
|

Re: grok 1.4 I can't import netsnmp

3sso
I'm install package from apt-set install and I can see package dir at /dist-packages
I can import in interpreter mode but can't in grok

I try modify buildout.cfg and setup.py now still not work

ps. I try reinstall it by easy-install have problem about package name not same too. so now I don't sure install it from what package. maybe

python-pynetsnmp
python-pysnmp-common
python-pysnmp2
python-twisted-snmp
libsnmp-python

all package name search from apt-cache search snmp command but can't use in easy-install command

Christian Klinger wrote
Hi,

i guess netsmnp is not available via pypi. I think you have to install
this package in your environment. The installation process is decribed
here. If it's the right package?

https://net-snmp.svn.sourceforge.net/svnroot/net-snmp/trunk/net-snmp/python/README

HTH Christian


>
> Owen Shepherd say I can add 'netsnmp' to setup.py
>
> I did it but still error
>
> now I dont sure what real package name for it (maybe pysnmp)
>
> at interpreter mode on ubuntu (run script on shell) it work with
>
> import snmp<<
>
> sample code
>
> result = netsnmp.snmpget(oid + str(int(v)+i), Version=2,
> DestHost="10.255.105.10", Community="public")
>
> ----------------------
>
> the error is
>
> 2011-06-27 05:53:57,011 WARNING [root] Developer mode is enabled: this is a
> security risk and should NOT be enabled on production servers. Developer
> mode can usually be turned off by setting the `devmode` option to `off` or
> by removing it from the instance configuration file completely.
> 2011-06-27 05:53:57,587 WARNING [ZODB.blob] (9327) Blob dir
> /home/takz/zte/var/blobstorage/ has insecure mode setting
> Starting server in PID 9327.
> serving on http://192.168.20.113:8080
> 192.168.20.48 - - [27/Jun/2011:05:54:15 +0700] "GET / HTTP/1.1" 401 46 "-"
> "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko)
> Chrome/14.0.797.0 Safari/535.1"
> 192.168.20.48 - - [27/Jun/2011:05:54:21 +0700] "GET / HTTP/1.1" 303 0 "-"
> "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko)
> Chrome/14.0.797.0 Safari/535.1"
> 192.168.20.48 - - [27/Jun/2011:05:54:21 +0700] "GET
> /%2B%2Bgrokui%2B%2B/%40%40applications HTTP/1.1" 200 2445 "-" "Mozilla/5.0
> (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko)
> Chrome/14.0.797.0 Safari/535.1"
> 2011-06-27 05:54:23,854 ERROR [SiteError]
> http://192.168.20.113:8080/zte/@@index
> Traceback (most recent call last):
>    File
> "/home/takz/.buildout/eggs/zope.publisher-3.12.6-py2.7.egg/zope/publisher/publish.py",
> line 132, in publish
>      result = publication.callObject(request, obj)
>    File
> "/home/takz/.buildout/eggs/grokcore.view-2.5-py2.7.egg/grokcore/view/publication.py",
> line 56, in callObject
>      return super(ZopePublicationSansProxy, self).callObject(request, ob)
>    File
> "/home/takz/.buildout/eggs/zope.app.publication-3.13.1-py2.7.egg/zope/app/publication/zopepublication.py",
> line 207, in callObject
>      return mapply(ob, request.getPositionalArguments(), request)
>    File
> "/home/takz/.buildout/eggs/zope.publisher-3.12.6-py2.7.egg/zope/publisher/publish.py",
> line 107, in mapply
>      return debug_call(obj, args)
>    File
> "/home/takz/.buildout/eggs/zope.publisher-3.12.6-py2.7.egg/zope/publisher/publish.py",
> line 113, in debug_call
>      return obj(*args)
>    File
> "/home/takz/.buildout/eggs/grokcore.view-2.5-py2.7.egg/grokcore/view/components.py",
> line 139, in __call__
>      return self._render_template()
>    File
> "/home/takz/.buildout/eggs/grokcore.view-2.5-py2.7.egg/grokcore/view/components.py",
> line 143, in _render_template
>      return self.template.render(self)
>    File
> "/home/takz/.buildout/eggs/grokcore.view-2.5-py2.7.egg/grokcore/view/components.py",
> line 316, in render
>      return template.pt_render(namespace)
>    File
> "/home/takz/.buildout/eggs/zope.pagetemplate-3.5.2-py2.7.egg/zope/pagetemplate/pagetemplate.py",
> line 113, in pt_render
>      strictinsert=0, sourceAnnotations=sourceAnnotations)()
>    File
> "/home/takz/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py",
> line 271, in __call__
>      self.interpret(self.program)
>    File
> "/home/takz/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py",
> line 343, in interpret
>      handlers[opcode](self, args)
>    File
> "/home/takz/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py",
> line 819, in do_loop_tal
>      iterator = self.engine.setRepeat(name, expr)
>    File
> "/home/takz/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/tales.py",
> line 682, in setRepeat
>      expr = self.evaluate(expr)
>    File
> "/home/takz/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/tales.py",
> line 696, in evaluate
>      return expression(self)
>    File
> "/home/takz/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/pythonexpr.py",
> line 59, in __call__
>      return eval(self._code, vars)
>    File "<string>", line 1, in<module>
>    File "/home/takz/zte/src/zte/app.py", line 14, in showstatall
>      result = netsnmp.snmpget(oid + str(int(v)+i), Version=2,
> DestHost="10.255.105.10", Community="public")
> NameError: global name 'netsnmp' is not defined
>
>
>
>
>
>
> Christian Klinger wrote:
>>
>> Hi,
>>
>> can you paste the traceback of the error you recive during startup?
>>
>> Christian
>>>
>>> I need to build web-app for check my network device by snmp (oid)
>>>
>>> I try my script on shell command it ok (it need import netsnmp)
>>>
>>> but on Grok got error if import netsnmp in app.py
>>>
>>> (in my case cant start paster serve it show error about netsnmp module)
>>>
>>>
>>> please help
>>>
>>> regard
>>
>>
>> _______________________________________________
>> Grok-dev mailing list
>> Grok-dev@zope.org
>> https://mail.zope.org/mailman/listinfo/grok-dev
>>
>>
>


_______________________________________________
Grok-dev mailing list
Grok-dev@zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
Reply | Threaded
Open this post in threaded view
|

Re: grok 1.4 I can't import netsnmp

Jan-Wijbrand Kolman-3
On 6/28/11 10:44 , 3sso wrote:

>
> I'm install package from apt-set install and I can see package dir at
> /dist-packages
> I can import in interpreter mode but can't in grok
>
> I try modify buildout.cfg and setup.py now still not work
>
> ps. I try reinstall it by easy-install have problem about package name not
> same too. so now I don't sure install it from what package. maybe
>
> python-pynetsnmp
> python-pysnmp-common
> python-pysnmp2
> python-twisted-snmp
> libsnmp-python
>
> all package name search from apt-cache search snmp command but can't use in
> easy-install command

Aren't (some of) these packages listed here?

  http://pypi.python.org/pypi?%3Aaction=search&term=snmp&submit=search

Mind you that the python package may have been split up in several deb
packages. Also note that, if these python packages contain compiled
code, the corresponding *-dev deb package may need to be installed.

The reason you python interpreter *does* see the packages and the
application as set up by buildout *does not*, is because buildout
*intentionally* isolates you from system-installed packages.

You could enable including system-installed package from your
buildout.cfg. Let me see how to do that...

...right, this URL might help:


http://pypi.python.org/pypi/zc.buildout/1.5.2#system-python-and-zc-buildout-1-5

HTH
regards, jw

_______________________________________________
Grok-dev mailing list
[hidden email]
https://mail.zope.org/mailman/listinfo/grok-dev
Reply | Threaded
Open this post in threaded view
|

Re: grok 1.4 I can't import netsnmp

3sso
You could enable including system-installed package from your
buildout.cfg.

site-packages=true  << right or not

if this option I was try still not work




Jan-Wijbrand Kolman-3 wrote
On 6/28/11 10:44 , 3sso wrote:
>
> I'm install package from apt-set install and I can see package dir at
> /dist-packages
> I can import in interpreter mode but can't in grok
>
> I try modify buildout.cfg and setup.py now still not work
>
> ps. I try reinstall it by easy-install have problem about package name not
> same too. so now I don't sure install it from what package. maybe
>
> python-pynetsnmp
> python-pysnmp-common
> python-pysnmp2
> python-twisted-snmp
> libsnmp-python
>
> all package name search from apt-cache search snmp command but can't use in
> easy-install command

Aren't (some of) these packages listed here?

  http://pypi.python.org/pypi?%3Aaction=search&term=snmp&submit=search

Mind you that the python package may have been split up in several deb
packages. Also note that, if these python packages contain compiled
code, the corresponding *-dev deb package may need to be installed.

The reason you python interpreter *does* see the packages and the
application as set up by buildout *does not*, is because buildout
*intentionally* isolates you from system-installed packages.

You could enable including system-installed package from your
buildout.cfg. Let me see how to do that...

...right, this URL might help:


http://pypi.python.org/pypi/zc.buildout/1.5.2#system-python-and-zc-buildout-1-5

HTH
regards, jw

_______________________________________________
Grok-dev mailing list
Grok-dev@zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
Reply | Threaded
Open this post in threaded view
|

Re: grok 1.4 I can't import netsnmp

3sso
In reply to this post by Jan-Wijbrand Kolman-3
in setup.py

install_requires=['setuptools',
                      .....
                      .....
                       'netsnmp', # i try to add

and buildout.cfg

include-site-packages = false # i try modify to "true"


then run ./bin/buildout it show error cant find package






Jan-Wijbrand Kolman-3 wrote
On 6/28/11 10:44 , 3sso wrote:
>
> I'm install package from apt-set install and I can see package dir at
> /dist-packages
> I can import in interpreter mode but can't in grok
>
> I try modify buildout.cfg and setup.py now still not work
>
> ps. I try reinstall it by easy-install have problem about package name not
> same too. so now I don't sure install it from what package. maybe
>
> python-pynetsnmp
> python-pysnmp-common
> python-pysnmp2
> python-twisted-snmp
> libsnmp-python
>
> all package name search from apt-cache search snmp command but can't use in
> easy-install command

Aren't (some of) these packages listed here?

  http://pypi.python.org/pypi?%3Aaction=search&term=snmp&submit=search

Mind you that the python package may have been split up in several deb
packages. Also note that, if these python packages contain compiled
code, the corresponding *-dev deb package may need to be installed.

The reason you python interpreter *does* see the packages and the
application as set up by buildout *does not*, is because buildout
*intentionally* isolates you from system-installed packages.

You could enable including system-installed package from your
buildout.cfg. Let me see how to do that...

...right, this URL might help:


http://pypi.python.org/pypi/zc.buildout/1.5.2#system-python-and-zc-buildout-1-5

HTH
regards, jw

_______________________________________________
Grok-dev mailing list
Grok-dev@zope.org
https://mail.zope.org/mailman/listinfo/grok-dev