Python MPLD3未在浏览器中显示图形
我在MacOSX10.11.4上使用谷歌浏览器。我正在尝试从Python MPLD3未在浏览器中显示图形,python,python-3.x,matplotlib,mpld3,Python,Python 3.x,Matplotlib,Mpld3,我在MacOSX10.11.4上使用谷歌浏览器。我正在尝试从mpld3库运行示例。我读到mpld3在python 3.5上不起作用 mpld3项目与Python 2.6-2.7和3.3-3.4兼容 因此,我创建了一个3.4环境,使用: conda create -n py34 python=3.4 anaconda 在运行脚本时,我遇到以下错误: Exception happened during processing of request from ('127.0.0.1', 52484)
mpld3
库运行示例。我读到mpld3
在python 3.5上不起作用
mpld3
项目与Python 2.6-2.7和3.3-3.4兼容
因此,我创建了一个3.4环境,使用:
conda create -n py34 python=3.4 anaconda
在运行脚本时,我遇到以下错误:
Exception happened during processing of request from ('127.0.0.1', 52484)
Traceback (most recent call last):
File "/Users/Neill/anaconda/envs/py34/lib/python3.4/socketserver.py", line 305, in _handle_request_noblock
self.process_request(request, client_address)
File "/Users/Neill/anaconda/envs/py34/lib/python3.4/socketserver.py", line 331, in process_request
self.finish_request(request, client_address)
File "/Users/Neill/anaconda/envs/py34/lib/python3.4/socketserver.py", line 344, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/Users/Neill/anaconda/envs/py34/lib/python3.4/socketserver.py", line 673, in __init__
self.handle()
File "/Users/Neill/anaconda/envs/py34/lib/python3.4/http/server.py", line 401, in handle
self.handle_one_request()
File "/Users/Neill/anaconda/envs/py34/lib/python3.4/http/server.py", line 389, in handle_one_request
method()
File "/Users/Neill/anaconda/envs/py34/lib/python3.4/site-packages/mpld3/_server.py", line 38, in do_GET
self.wfile.write("<html><head>"
File "/Users/Neill/anaconda/envs/py34/lib/python3.4/socket.py", line 398, in write
return self._sock.send(b)
TypeError: 'str' does not support the buffer interface
处理来自('127.0.0.1',52484'的请求时发生异常
回溯(最近一次呼叫最后一次):
文件“/Users/Neill/anaconda/envs/py34/lib/python3.4/socketserver.py”,第305行,位于“句柄”、“请求”noblock中
自我处理请求(请求、客户地址)
文件“/Users/Neill/anaconda/envs/py34/lib/python3.4/socketserver.py”,第331行,正在处理请求
自我完成请求(请求、客户地址)
文件“/Users/Neill/anaconda/envs/py34/lib/python3.4/socketserver.py”,第344行,在finish_请求中
self.RequestHandlerClass(请求、客户端地址、self)
文件“/Users/Neill/anaconda/envs/py34/lib/python3.4/socketserver.py”,第673行,在__
self.handle()
文件“/Users/Neill/anaconda/envs/py34/lib/python3.4/http/server.py”,第401行,在句柄中
self.handle_one_请求()
文件“/Users/Neill/anaconda/envs/py34/lib/python3.4/http/server.py”,第389行,在handle\u one\u请求中
方法()
文件“/Users/Neill/anaconda/envs/py34/lib/python3.4/site packages/mpld3/_server.py”,第38行,在do_GET中
self.wfile.write(“”)
写入文件“/Users/Neill/anaconda/envs/py34/lib/python3.4/socket.py”,第398行
返回自我发送(b)
TypeError:“str”不支持缓冲区接口
我还确保安装了最新版本的mpld3
。然后本地服务器会显示一个空白页。Chrome的开发工具也不会报告错误。有人知道问题出在哪里吗