[英]Python Pyro4 has no attribute 'naming'
I am having trouble with Pyro 4 in Windows 10. 我在Windows 10中遇到Pyro 4的问题。
I installed Pyro4 via pip
. 我通过pip
安装了Pyro4。
I open cmd and type py
. 我打开cmd并键入py
。
I type: import Pyro4
. 我键入: import Pyro4
。
I type: Pyro4.naming
. 我输入: Pyro4.naming
。
I get back AttributeError: module 'Pyro4' has no attribute 'naming'
. 我回到了AttributeError: module 'Pyro4' has no attribute 'naming'
。
I type: help(Pyro4)
. 我输入: help(Pyro4)
。
naming
is listed in the package contents. naming
列在包内容中。
naming
is a module and a part of the package Pyro4
. naming
是一个模块和Pyro4
包的Pyro4
。 It has to be imported separately: 它必须单独导入:
import Pyro4.naming
Or: 要么:
import Pyro4.naming as naming
Since naming
is a module you cant just call it. 由于naming
是一个模块,你不能称之为。
help(Pyro4.naming)
proves it is loaded module and it is working. 证明它是加载模块,它正在工作。 You can access classes or functions in naming
as 您可以在naming
访问类或函数
Pyro4.naming.AutoCleaner(...)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.