2015-06-19 23 views
6

Ho intenzione di installare la libreria ZeroMQ nel mio pc usando il programma di installazione del pacchetto pip. Io uso https://learning-0mq-with-pyzmq.readthedocs.org/en/latest/pyzmq/basics.html#installation come mio riferimento. Dopo l'esecuzione del comando follwing:AttributeError: l'oggetto 'str' non ha attributo 'decodifica'

pip install pyzmq-static 

ottengo questo errore:

C:\Users\MyName>pip install pyzmq-static 
You are using pip version 7.0.1, however version 7.0.3 is available. 
You should consider upgrading via the 'pip install --upgrade pip' command. 
Collecting pyzmq-static 
    Using cached pyzmq-static-2.2.tar.gz 
    Complete output from command python setup.py egg_info: 
    Traceback (most recent call last): 
     File "<string>", line 20, in <module> 
     File "C:\Users\MyName\AppData\Local\Temp\pip-build-m8zyvx48\pyzmq-static\ 
setup.py", line 6, in <module> 
     long_description = open(os.path.join(os.path.dirname(__file__), 'README. 
rst') 
    AttributeError: 'str' object has no attribute 'decode' 

    ---------------------------------------- 
Command "python setup.py egg_info" failed with error code 1 in C:\Users\MyName\ 
AppData\Local\Temp\pip-build-m8zyvx48\pyzmq-static 

La mia versione Python è 3.5 e utilizzare Windows 8.0 del sistema operativo.

Aggiornamento

ho scoperto che il mio articolo citato ha usato python 2.X e sto usando python 3.5.

+4

Stai usando Python 3? Sembra che 'str.decode' esista in Python 2, ma non in Python 3. –

+0

@tobias_k, sì, io uso python35. Aggiornerò il mio post –

+0

questo modulo è disponibile per la versione python 3 – The6thSense

risposta

4

Perché stai usando pyzmq-static? Secondo this referencepyzmq-static è obsoleto, l'ultimo pacchetto è stato caricato l'11-09-2012, forse non è stato sviluppato per python 3.x.

Si dovrebbe invece provare a utilizzare pyzmq (come indicato anche dalla pagina Pypi per pyzmq-static).

Problemi correlati