无法在Mac 10.14.3中安装python 3.7软件包Fiona,lxml,pandas,Pillow

时间:2019-02-07 15:26:34

标签: python-3.x macos crash install macos-mojave

我试图在运行mac os 10.14.3的新mac系统中安装python 3.7 virtualenv软件包。但是由于环境错误,系统安装失败

包装:

lxml==3.8.0 
Pillow==4.1.1 
Fiona==1.7.10.post1
pandas==0.20.2

我已将完整的崩溃报告附在https://pastebin.com/tzMwwHjB

  Failed building wheel for Fiona
  Failed building wheel for lxml
  Failed building wheel for pandas
  Failed building wheel for Pillow
Error checking for conflicts.
Traceback (most recent call last):
  File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2897, in _dep_map
    return self.__dep_map
  File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2691, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2888, in _parsed_pkg_info
    return self._pkg_info
  File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2691, in __getattr__
    raise AttributeError(attr)
AttributeError: _pkg_info

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 503, in _warn_about_conflicts
    package_set, _dep_info = check_install_conflicts(to_install)
  File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_internal/operations/check.py", line 108, in check_install_conflicts
    package_set, _ = create_package_set_from_installed()
  File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_internal/operations/check.py", line 47, in create_package_set_from_installed
    package_set[name] = PackageDetails(dist.version, dist.requires())
  File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2635, in requires
    dm = self._dep_map
  File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2899, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2908, in _compute_dependencies
    for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
  File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2890, in _parsed_pkg_info
    metadata = self.get_metadata(self.PKG_INFO)
  File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1410, in get_metadata
    value = self._get(self._fn(self.egg_info, name))
  File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1522, in _get
    with open(path, 'rb') as stream:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/Fiona-1.8.4.dist-info/METADATA'
Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/Fiona-1.8.4.dist-info/RECORD'

任何人都可以知道解决方案吗?我试图解决此问题的最后两天仍然面对它。

1 个答案:

答案 0 :(得分:0)

  1. 使用受支持的Python版本
  2. 尝试以下操作:

    pip3 install --user软件包名称(对于Python3) pip install --user软件包名称(对于Python2)

    注意:将软件包名称替换为pandas,lxml等