[Twisted-Python] FW: No module names "twisted.names" due to confuse twisted-core library folder
Hi all, I have a problem about twisted-core library location. I downloaded and installed twisted-10.2-core(TwistedCore-10.2.0.tar.bz2) and names(TwistedNames-10.2.0.tar.bz2) from source code[1]. But python does not find "names" plugin. Because twisted-core has been installed under /usr/lib64/ but names is under /usr/lib/ defaultly. [root@trhtlangley38 sylkserver]# ll /usr/lib64/python2.6/site-packages/twisted/plugins/ total 124 -rw------- 1 root root 979 Jan 3 2008 cred_anonymous.py -rw------- 1 root root 1451 Nov 13 18:02 cred_anonymous.pyc -rw------- 1 root root 1837 Jan 3 2008 cred_file.py -rw------- 1 root root 2222 Nov 13 18:02 cred_file.pyc -rw------- 1 root root 2352 Jan 3 2008 cred_memory.py -rw------- 1 root root 2673 Nov 13 18:02 cred_memory.pyc -rw------- 1 root root 3804 Jan 3 2008 cred_unix.py -rw------- 1 root root 4387 Nov 13 18:02 cred_unix.pyc -rwx------ 1 root root 5868 Nov 13 13:42 dropin.cache -rw------- 1 root root 549 Jul 29 2008 __init__.py -rw------- 1 root root 533 Nov 13 18:02 __init__.pyc -rw------- 1 root root 239 Apr 8 2008 twisted_ftp.py -rw------- 1 root root 341 Nov 13 18:02 twisted_ftp.pyc -rw------- 1 root root 270 Apr 8 2008 twisted_inet.py -rw------- 1 root root 373 Nov 13 18:02 twisted_inet.pyc -rw------- 1 root root 290 Apr 8 2008 twisted_manhole.py -rw------- 1 root root 396 Nov 13 18:02 twisted_manhole.pyc -rw------- 1 root root 285 Apr 8 2008 twisted_portforward.py -rw------- 1 root root 395 Nov 13 18:02 twisted_portforward.pyc -rw------- 1 root root 1417 Dec 23 2006 twisted_qtstub.py -rw------- 1 root root 1996 Nov 13 18:02 twisted_qtstub.pyc -rw------- 1 root root 1420 Nov 15 2006 twisted_reactors.py -rw------- 1 root root 1645 Nov 13 18:02 twisted_reactors.pyc -rw------- 1 root root 257 Apr 8 2008 twisted_socks.py -rw------- 1 root root 361 Nov 13 18:02 twisted_socks.pyc -rw------- 1 root root 298 Apr 8 2008 twisted_telnet.py -rw------- 1 root root 403 Nov 13 18:02 twisted_telnet.pyc -rw------- 1 root root 2034 Dec 25 2009 twisted_trial.py -rw------- 1 root root 1876 Nov 13 18:02 twisted_trial.pyc [root@trhtlangley38 sylkserver]# ll /usr/lib/python2.6/site-packages/twisted/plugins/ total 16 -rw------- 1 root root 257 Apr 8 2008 twisted_names.py -rw------- 1 root root 359 Nov 15 10:30 twisted_names.pyc -rw------- 1 root root 1175 Nov 2 2008 twisted_words.py -rw------- 1 root root 1973 Nov 15 10:29 twisted_words.pyc [root@trhtlangley38 sylkserver]# [root@example ]# python Python 2.6.6 (r266:84292, Sep 12 2011, 14:03:14) [GCC 4.4.5 20110214 (Red Hat 4.4.5-6)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import twisted
print twisted.__file__
/usr/lib64/python2.6/site-packages/twisted/__init__.pyc
import twisted.names
Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named names
I tried --prefix options to install method but i cannot pass the problem. Does anyone know how to fix the problem and why the names module is not installed under twisted-core library path. OS: RHEL 6.2 Thanks [1] http://twistedmatrix.com
On 09:27 am, akaradag@netas.com.tr wrote:
Hi all,
I have a problem about twisted-core library location. I downloaded and installed twisted-10.2-core(TwistedCore-10.2.0.tar.bz2) and names(TwistedNames-10.2.0.tar.bz2) from source code[1]. But python does not find "names" plugin. Because twisted-core has been installed under /usr/lib64/ but names is under /usr/lib/ defaultly.
This is due to a bug in the local distutils configuration of your Linux distribution which causes it to select incorrect installation targets and does not let you override these choices. You should report the bug to them. Meanwhile, you can solve the problem by: 1) Use the platform-supplied packages of Twisted instead of installing your own version from source or 2) Install Twisted instead of Twisted Core and Twisted Names These are both good ideas anyway, disregarding your current particular installation problem. If possible, do them both. Jean-Paul
Hi Jean, Thanks for reply. I passed the problem with the below approach; Why am I getting ImportErrors for Twisted subpackages on my 64bit installation of RedHat/Fedora/CentOS? Red Hat and derived Linux distributions arrange to have certain Python libraries installed in /usr/lib/ and other parts installed in /usr/lib64/. This is problematic for Twisted, since it results in some of Twisted being installed in one directory and the rest installed in another. Python will load a package from only one directory. You can override this default behavior when you install Twisted by supplying the --install-lib parameter when running Twisted's setup.py. http://twistedmatrix.com/trac/wiki/FrequentlyAskedQuestions#WhyamIgettin gImportErrorsforTwistedsubpackagesonmy64bitinstallationofRedHatFedoraCen tOS thanks -----Original Message----- From: twisted-python-bounces@twistedmatrix.com [mailto:twisted-python-bounces@twistedmatrix.com] On Behalf Of exarkun@twistedmatrix.com Sent: Thursday, November 15, 2012 1:53 PM To: Twisted general discussion Subject: Re: [Twisted-Python] FW: No module names "twisted.names" due to confuse twisted-core library folder On 09:27 am, akaradag@netas.com.tr wrote:
Hi all,
I have a problem about twisted-core library location. I downloaded and installed twisted-10.2-core(TwistedCore-10.2.0.tar.bz2) and names(TwistedNames-10.2.0.tar.bz2) from source code[1]. But python does not find "names" plugin. Because twisted-core has been installed under /usr/lib64/ but names is under /usr/lib/ defaultly.
This is due to a bug in the local distutils configuration of your Linux distribution which causes it to select incorrect installation targets and does not let you override these choices. You should report the bug to them. Meanwhile, you can solve the problem by: 1) Use the platform-supplied packages of Twisted instead of installing your own version from source or 2) Install Twisted instead of Twisted Core and Twisted Names These are both good ideas anyway, disregarding your current particular installation problem. If possible, do them both. Jean-Paul _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
participants (2)
-
Anil KARADAG
-
exarkun@twistedmatrix.com