2014-06-20 5 views
9

Ich verwende Python 3.4 auf einer Ubuntu VM. Ich verwende eine virtuelle Umgebung für das Projekt, an dem ich gerade arbeite. Ich habe versucht, DNSPython zu installieren, indem ich sowohl pip install als auch den Teer von ihrer Webseite heruntergeladen habe. Ich erhalte die folgenden Fehler, wenn zu installieren versuchen:DNSPython Installationsfehler

copying build/lib/dns/util.py -> /home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns 
byte-compiling /home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/util.py to util.cpython-34.pyc 
byte-compiling /home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/tsig.py to tsig.cpython-34.pyc 
    File "/home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/tsig.py", line 96 
    long_time = time + 0L 
         ^
SyntaxError: invalid syntax 

byte-compiling /home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/dnssec.py to dnssec.cpython-34.pyc 
    File "/home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/dnssec.py", line 121 
    raise UnsupportedAlgorithm, 'unsupported algorithm "%s"' % algorithm 
          ^
SyntaxError: invalid syntax 

byte-compiling /home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/rdatatype.py to rdatatype.cpython-34.pyc 
    File "/home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/rdatatype.py", line 213 
    text = 'TYPE' + `value` 
        ^
SyntaxError: invalid syntax 

byte-compiling /home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/rdataclass.py to rdataclass.cpython-34.pyc 
    File "/home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/rdataclass.py", line 103 
    text = 'CLASS' + `value` 
        ^
SyntaxError: invalid syntax 

byte-compiling /home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/entropy.py to entropy.cpython-34.pyc 
    File "/home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/entropy.py", line 104 
    if size > 4294967296L: 
         ^
SyntaxError: invalid syntax 

byte-compiling /home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/zone.py to zone.cpython-34.pyc 
    File "/home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/zone.py", line 874 
    except dns.exception.SyntaxError, detail: 
            ^
SyntaxError: invalid syntax 

byte-compiling /home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/edns.py to edns.cpython-34.pyc 
Sorry: TabError: inconsistent use of tabs and spaces in indentation (edns.py, line 117) 
byte-compiling /home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/name.py to name.cpython-34.pyc 
    File "/home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/name.py", line 183 
    h = 0L 
     ^
SyntaxError: invalid syntax 

byte-compiling /home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/query.py to query.cpython-34.pyc 
    File "/home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/query.py", line 118 
    except select.error, e: 
        ^
SyntaxError: invalid syntax 

byte-compiling /home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/renderer.py to renderer.cpython-34.pyc 
    File "/home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/renderer.py", line 221 
    ednsflags &= 0xFF00FFFFL 
         ^
SyntaxError: invalid syntax 

byte-compiling /home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/message.py to message.cpython-34.pyc 
    File "/home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/message.py", line 176 
    return '<DNS message, ID ' + `self.id` + '>' 
           ^
SyntaxError: invalid syntax 

byte-compiling /home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/ttl.py to ttl.cpython-34.pyc 
    File "/home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/ttl.py", line 39 
    total = 0L 
      ^
SyntaxError: invalid syntax 

byte-compiling /home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/rdtypes/ANY/LOC.py to LOC.cpython-34.pyc 
    File "/home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/rdtypes/ANY/LOC.py", line 22 
    _pows = (1L, 10L, 100L, 1000L, 10000L, 100000L, 1000000L, 10000000L, 
      ^
SyntaxError: invalid syntax 

byte-compiling /home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/node.py to node.cpython-34.pyc 
    File "/home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/node.py", line 172 
    raise ValueError, 'replacement is not an rdataset' 
        ^
SyntaxError: invalid syntax 

byte-compiling /home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/tokenizer.py to tokenizer.cpython-34.pyc 
    File "/home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dns/tokenizer.py", line 491 
    if value < 0 or value > 4294967296L: 
            ^
SyntaxError: invalid syntax 

running install_egg_info 
Writing /home/anton/JMWebStuff/JMWebStuff/lib/python3.4/site-packages/dnspython3-1.11.1.egg-info 

ich aber dies könnte zu Python 3 vs. Python 2 Ausgaben in Beziehung gesetzt werden, aber ich die Python-3-Version speziell heruntergeladen. Diese scheinen echte Fehler zu sein, aber ich habe niemanden gesehen, der solche Fehler gemeldet hat. Danke für jede Hilfe.

Antwort

16

Realisiert, dass ich in der Tat irgendwie noch die Python 2.x-Version heruntergeladen habe. Für andere, die in das gleiche Problem laufen: Verwendung dnspython3 installieren pip, nicht dnspython

+1

save me verwenden ein paar Stunden +1 – RSFalcon7

+1

DANKE !! verdammt, das war frustrierend. – WeaselFox

1

Wenn Sie dns für python3 Verwendung installiert werden soll: sudo PIP3 (nicht pip !!) installieren dnspython3. Tschüss!

+0

Es hängt vom Benutzersystem ab. Pip funktioniert möglicherweise, wenn python2 nicht auf dem System angezeigt wird. – jedema

0

Für die neuesten Versionen von Ubuntu und andere Debian-basierten Distributionen können u

sudo apt-get install python3-dnspython