簡體   English   中英

Mac OS X Lion上的python“ ImportError:無法導入名稱urandom”

[英]python on Mac OS X Lion “ImportError: cannot import name urandom”

自從我上次使用macport更新python(nonw 2.7.3)以來,遇到以下問題:

Traceback (most recent call last): File "", line 4, in File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtplib.py", line 46, 
in import email.utils File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/email/utils.py", line 27, 
in import random File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.py", line 47, 
in from os import urandom as _urandom 
ImportError: cannot import name urandom

我正在運行:

  • OS X版本10.7.5
  • python版本2.7.3
  • $ PATH:/ opt / local / bin:/ opt / local / sbin:/ usr / bin:/ bin:/ usr / sbin:/ sbin:/ usr / local / bin:/ usr / X11 / bin

你能幫我嗎? 謝謝

嘗試更新您的Xcode命令行工具。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM