Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/321.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python I';我试图使用pip安装pyinstaller,但它';s给我这个错误:ImportError:没有名为';bz2&x27;_Python_Pip_Pyinstaller_Importerror - Fatal编程技术网

Python I';我试图使用pip安装pyinstaller,但它';s给我这个错误:ImportError:没有名为';bz2&x27;

Python I';我试图使用pip安装pyinstaller,但它';s给我这个错误:ImportError:没有名为';bz2&x27;,python,pip,pyinstaller,importerror,Python,Pip,Pyinstaller,Importerror,我重新安装了所有python版本(2.7、3.4和3.6),不再出现“编码”错误,但出现了另一个问题 我正在尝试安装pyinstaller,我运行 pip install pyinstaller但它给了我: You are using pip version 6.0.8, however version 9.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Co

我重新安装了所有python版本(2.7、3.4和3.6),不再出现“编码”错误,但出现了另一个问题


我正在尝试安装pyinstaller,我运行
pip install pyinstaller
但它给了我:

You are using pip version 6.0.8, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pyinstaller
  Using cached PyInstaller-3.2.1.tar.bz2
  Exception:
  Traceback (most recent call last):
    File "/usr/local/lib/python3.4/tarfile.py", line 1641, in bz2open
      import bz2
  ImportError: No module named 'bz2'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/usr/local/lib/python3.4/site-packages/pip/basecommand.py", line 232, in main
      status = self.run(options, args)
    File "/usr/local/lib/python3.4/site-packages/pip/commands/install.py", line 339, in run
      requirement_set.prepare_files(finder)
    File "/usr/local/lib/python3.4/site-packages/pip/req/req_set.py", line 355, in prepare_files
      do_download, session=self.session,
    File "/usr/local/lib/python3.4/site-packages/pip/download.py", line 782, in unpack_url
      session,
    File "/usr/local/lib/python3.4/site-packages/pip/download.py", line 671, in unpack_http_url
      unpack_file(from_path, location, content_type, link)
    File "/usr/local/lib/python3.4/site-packages/pip/utils/__init__.py", line 654, in unpack_file
      untar_file(filename, location)
    File "/usr/local/lib/python3.4/site-packages/pip/utils/__init__.py", line 583, in untar_file
      tar = tarfile.open(filename, mode)
    File "/usr/local/lib/python3.4/tarfile.py", line 1566, in open
      return func(name, filemode, fileobj, **kwargs)
    File "/usr/local/lib/python3.4/tarfile.py", line 1643, in bz2open
      raise CompressionError("bz2 module is not available")
  tarfile.CompressionError: bz2 module is not available

打开python目录并确保脚本文件夹在那里

您能提供更多详细信息吗?您如何准确地使用
pip
?您能发布完整的错误跟踪吗?我正在尝试安装pyinstaller。我解决了另一个问题,但它仍然不起作用,错误现在是:importError:没有名为“bz2”的模块。@juanpa.arrivillaga