Python 2.7 如何在python中使用特使包?

Python 2.7 如何在python中使用特使包?,python-2.7,jupyter-notebook,python-envoy,Python 2.7,Jupyter Notebook,Python Envoy,我已经安装了包特使。我运行了脚本,但出现了windows错误。我对Environment.run进行了注释,然后运行完整的脚本,但当我删除注释时,出现了错误 import envoy # This data is checked-in to the repository and is a compressed # version of the output from Example 3 F = 'resources/ch06-mailboxes/data/enron.mbox.js

我已经安装了包
特使
。我运行了脚本,但出现了windows错误。我对Environment.run进行了注释,然后运行完整的脚本,但当我删除注释时,出现了错误

 import envoy

 # This data is checked-in to the repository and is a compressed 
 # version of the output from Example 3

 F = 'resources/ch06-mailboxes/data/enron.mbox.json.bz2'

 r = envoy.run("bunzip2 %s" % (F,))
 print r.std_out
 print r.std_err
脚本的回溯:

 Exception in thread Thread-9:
Traceback (most recent call last):
 File "C:\Users\sachin\Anaconda\lib\threading.py", line 810, in __bootstrap_inner
self.run()
File "C:\Users\sachin\Anaconda\lib\threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "C:\Users\sachin\Anaconda\lib\site-packages\envoy\core.py", line 40, in target
bufsize=0,
File "C:\Users\sachin\Anaconda\lib\subprocess.py", line 709, in __init__
errread, errwrite)
File "C:\Users\sachin\Anaconda\lib\subprocess.py", line 957, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
请试试这个:


F=os.path.join(os.getcwd(),'resources/ch06邮箱/data/enron.mbox.json.bz2')

您需要提供“enron.mbox.json.bz2”的完整路径,类似于
f='C:/path/to/resources/ch06 mailboxes/data/enron.mbox.json.bz2'
我也输入了完整路径,但出现了相同的错误。您还需要将完整路径拉到
bunzip2
。我正在尝试安装bunzip2 packege,但它没有安装。不知道如何安装bunzip2您需要先下载并安装这将为您提供存档实用程序。