安装 Mayavi : UnicodeEncodeError: 'charmap' 编解码器无法编码字符



我正在尝试使用Anaconda 3.6在Windows计算机上安装Mayavi。

不幸的是,我得到了一个我不明白的错误。我仍在发现Python。

我已经在互联网上查看了其他类似的问题,但找不到任何有效的东西。

你能帮帮我吗?

(C:Anaconda) C:Windowssystem32>pip install mayavi --upgrade
Collecting mayavi
  Using cached mayavi-4.5.0.tar.bz2
Requirement already up-to-date: apptools in c:anacondalibsite-packages (from
mayavi)
Requirement already up-to-date: traits in c:anacondalibsite-packages (from ma
yavi)
Requirement already up-to-date: traitsui in c:anacondalibsite-packages (from
mayavi)
Requirement already up-to-date: configobj in c:anacondalibsite-packages (from
 apptools->mayavi)
Requirement already up-to-date: pyface in c:anacondalibsite-packages (from tr
aitsui->mayavi)
Requirement already up-to-date: six in c:anacondalibsite-packages (from confi
gobj->apptools->mayavi)
Requirement already up-to-date: pygments in c:anacondalibsite-packages (from
pyface->traitsui->mayavi)
Building wheels for collected packages: mayavi
  Running setup.py bdist_wheel for mayavi ... error
  Complete output from command C:Anacondapython.exe -u -c "import setuptools,
tokenize;__file__='C:\Users\Fuentes\AppData\Local\Temp\pip-build-ybqsb6ne
mayavi\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().rep
lace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel
-d C:UsersFuentesAppDataLocalTemptmpielgp53opip-wheel- --python-tag cp36:
  running bdist_wheel
  running build
  ----------------------------------------------------------------------
  Building TVTK classes... vtkContextDevice2D: Ignoring method: Get/SetViewportR
ect 

[...]

    File "C:UsersFuentesAppDataLocalTemppip-build-ybqsb6nemayavitvtkwra
pper_gen.py", line 243, in generate_code
      self._gen_class_init(node, out)
    File "C:UsersFuentesAppDataLocalTemppip-build-ybqsb6nemayavitvtkwra
pper_gen.py", line 315, in _gen_class_init
      self.dm.write_class_doc(klass.__doc__, out, indent)
    File "C:UsersFuentesAppDataLocalTemppip-build-ybqsb6nemayavitvtkind
enter.py", line 169, in write_class_doc
      out.write(indent.format('n' + ret))
    File "C:Anacondalibencodingscp1252.py", line 19, in encode
      return codecs.charmap_encode(input,self.errors,encoding_table)[0]
  **UnicodeEncodeError: 'charmap' codec can't encode character 'u2264' in positio
n 3665: character maps to <undefined>**
  ----------------------------------------
  **Failed building wheel for mayavi**
  Running setup.py clean for mayavi
**Failed to build mayavi**
Installing collected packages: mayavi
  Running setup.py install for mayavi ... error

[...]

      File "C:Anacondalibencodingscp1252.py", line 19, in encode
        return codecs.charmap_encode(input,self.errors,encoding_table)[0]
    **UnicodeEncodeError: 'charmap' codec can't encode character 'u2264' in posit
ion 3665: character maps to <undefined>**
    ----------------------------------------
Command "C:Anacondapython.exe -u -c "import setuptools, tokenize;__file__='C:
Users\Fuentes\AppData\Local\Temp\pip-build-ybqsb6ne\mayavi\setup.py';f=g
etattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.c
lose();exec(compile(code, __file__, 'exec'))" install --record C:UsersFuentes
AppDataLocalTemppip-vjpz5i0u-recordinstall-record.txt --single-version-exter
nally-managed --compile" failed with error code 1 in C:UsersFuentesAppDataLo
calTemppip-build-ybqsb6nemayavi

我遇到了同样的问题。我的解决方案是从 https://www.lfd.uci.edu/~gohlke/pythonlibs/下载"mayavi-4.5.0+vtk81-cp36-cp36m-win_amd64.whl",然后直接安装 mayavi-4.5.0+vtk81-cp36-cp36m-win_amd64.whl。

最终,我设法安装了mayavi,但我没有解决问题:我只是卸载了Anaconda 3.6并安装了Anaconda 2.7。然后我可以安装我需要的一切。

我遇到了同样的问题,并通过下载 mayavi-4.5.0.zip https://pypi.python.org/pypi/mayavi 文件并复制粘贴"mayavi"文件夹直接复制到 Anaconda3\Lib 来覆盖它

相关内容

  • 没有找到相关文章

最新更新