Ich versuche, Python durch Udacity zu lernen, und das Thema ist für dieses Kapitel auf Twilio. Ich Twilio durch das Terminal installiert, wie vorgeschlagen:Python-Twilio Installationsproblem auf Mac?
Tonys-MacBook-Pro:Versions tonychu$ sudo easy_install twilio
Password:
Searching for twilio
Best match: twilio 6.3.dev0
Processing twilio-6.3.dev0-py2.7.egg
twilio 6.3.dev0 is already the active version in easy-install.pth
Using /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site- packages/twilio-6.3.dev0-py2.7.egg
Processing dependencies for twilio
Finished processing dependencies for twilio
die Ergebnisse legen nahe, es erfolgreich installiert ist, aber wenn ich Twilio Throught IDLE zu importieren versucht, wird es anders vorgeschlagen. Wie auch immer, ich kann das lösen? Vielen Dank.
Python 2.7.10 (v2.7.10:15c95b7d81dc, May 23 2015, 09:33:12)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable.
Visit http://www.python.org/download/mac/tcltk/ for current information.
>>> import twilio
>>> print(twilio.__version__)
6.3.dev0
>>> ================================ RESTART ================================
>>>
Traceback (most recent call last):
File "/Users/tonychu/Documents/Programming/Python/send_text.py", line 1, in <module>
from twilio.rest import TwilioRestClient
File "/Users/tonychu/Documents/Programming/Python/twilio.py", line 2, in <module>
print(twilio.__version__)
AttributeError: 'module' object has no attribute '__version__'
>>>
Hallo Danke für die Antwort. Ich habe "sudo easy_install pip" und "sudo pip install twilio" ausgeführt, aber ich stehe immer noch vor dem gleichen Problem beim Ausführen des Programms. Wäre es möglich, Sie per E-Mail oder Skype zu kontaktieren? –
Sicher, schreib mir eine Mail an [email protected] –