简体   繁体   English

UnicodeDecodeError:'ascii' 编解码器无法解码位置 433 中的字节 0xe2:创建 conda 环境时序号不在范围内(128)

[英]UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 433: ordinal not in range(128) when creating a conda environment

So I am using a server machine and I am not a sudoer there.所以我使用的是服务器机器,我不是那里的 sudoer。 Is there any way I could fix this error without being a sudoer?有什么办法可以在不成为 sudoer 的情况下修复此错误?

[jalal@scc2 jalal]$ pwd
/projectnb/ivcgroup/jalal



[jalal@scc2 jalal]$ conda env create -p /projectnb/ivcgroup/jalal/dpk  -f test-dlc.yaml
Collecting package metadata (repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.7.5
  latest version: 4.7.12

Please update conda by running

    $ conda update -n base -c defaults conda



Downloading and Extracting Packages
python-3.6.8         | 30.1 MB   | ######################################################################################################################################################################## | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Ran pip subprocess with arguments:
['/projectnb/ivcgroup/jalal/dpk/bin/python', '-m', 'pip', 'install', '-U', '-r', '/projectnb/ivcgroup/jalal/condaenv.z3h62tjp.requirements.txt']
Pip subprocess output:
Collecting opencv-python==3.4.5.20
  Downloading https://files.pythonhosted.org/packages/85/e1/d3eed618272f4b746339af1a84b2511e79c1708d88a9195cf25d743fa614/opencv_python-3.4.5.20-cp36-cp36m-manylinux1_x86_64.whl (25.4MB)
Collecting deeplabcut
  Using cached https://files.pythonhosted.org/packages/87/70/496226dbc1d22ab5e5af396d483910522b583389d5948e75db9ac4a7ef9c/deeplabcut-2.1.4-py3-none-any.whl
Collecting matplotlib==3.0.3
  Using cached https://files.pythonhosted.org/packages/e9/69/f5e05f578585ed9935247be3788b374f90701296a70c8871bcd6d21edb00/matplotlib-3.0.3-cp36-cp36m-manylinux1_x86_64.whl
Collecting tables==3.4.3
  Using cached https://files.pythonhosted.org/packages/0e/96/fdfaae19cf3c292c54e8b21dbc723a19871a767d4fa063d927ca05982409/tables-3.4.3-cp36-cp36m-manylinux1_x86_64.whl
Collecting tensorflow-gpu==1.13.1
  Downloading https://files.pythonhosted.org/packages/7b/b1/0ad4ae02e17ddd62109cd54c291e311c4b5fd09b4d0678d3d6ce4159b0f0/tensorflow_gpu-1.13.1-cp36-cp36m-manylinux1_x86_64.whl (345.2MB)
Collecting imgaug
  Using cached https://files.pythonhosted.org/packages/11/df/5a3bba95b4600d5ca7aff072082ef0d9837056dd28cc4e738e7ce88dd8f8/imgaug-0.3.0-py2.py3-none-any.whl
Collecting jupyter
  Using cached https://files.pythonhosted.org/packages/83/df/0f5dd132200728a86190397e1ea87cd76244e42d39ec5e88efd25b2abd7e/jupyter-1.0.0-py2.py3-none-any.whl
Collecting deepposekit
  Using cached https://files.pythonhosted.org/packages/bd/2f/f1f9d7f71f16b2c723d02f043d39e697256cf7d8b21f78b2bae066a1e334/deepposekit-0.3.4.tar.gz

Pip subprocess error:
    ERROR: Command errored out with exit status 1:
     command: /projectnb/ivcgroup/jalal/dpk/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/scratch/pip-install-523js4rg/deepposekit/setup.py'"'"'; __file__='"'"'/scratch/pip-install-523js4rg/deepposekit/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /scratch/pip-install-523js4rg/deepposekit/pip-egg-info
         cwd: /scratch/pip-install-523js4rg/deepposekit/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/scratch/pip-install-523js4rg/deepposekit/setup.py", line 42, in <module>
        long_description=open("README.md").read(),
      File "/projectnb/ivcgroup/jalal/dpk/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 433: ordinal not in range(128)
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.


CondaEnvException: Pip failed

[jalal@scc2 jalal]$ pwd
/projectnb/ivcgroup/jalal
[jalal@scc2 jalal]$ cat test-dlc.yaml
# dlc-ubuntu-GPU.yaml
#
# DeepLabCut environment for Ubuntu (tested on 18.04)
#
# install: conda env create -f dlc-ubuntu-GPU.yaml
# update:  conda env update -f dlc-ubuntu-GPU.yaml

#DeepLabCut2.0 Toolbox (deeplabcut.org)
#© A. & M. Mathis Labs
#https://github.com/AlexEMG/DeepLabCut
#Please see AUTHORS for contributors.

#https://github.com/AlexEMG/DeepLabCut/blob/master/AUTHORS
#Licensed under GNU Lesser General Public License v3.0

name: dlc-ubuntu-GPU
channels:
  - anaconda-fusion
  - defaults
dependencies:
  - pip
  - python=3.6.8
  - pip:
    - opencv-python==3.4.5.20
    - deeplabcut
    - matplotlib==3.0.3
    - tables==3.4.3
    - tensorflow-gpu==1.13.1
    - imgaug
    - jupyter
    - deepposekit
    - https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04/wxPython-4.0.3-cp36-cp36m-linux_x86_64.whl

For example I see this github solution but it does require sudo access: https://github.com/donnemartin/gitsome/issues/4#issuecomment-218441687例如,我看到了这个 github 解决方案,但它确实需要 sudo 访问权限: https : //github.com/donnemartin/gitsome/issues/4#issuecomment-218441687

$ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.5.1804 (Core) 
Release:    7.5.1804
Codename:   Core


$ uname -a
Linux scc2 3.10.0-957.27.2.el7.x86_64 #1 SMP Mon Jul 29 17:46:05 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

You declared a dependency to DeepPoseKit which tries setting its long_description by reading the project's README.md .你声明的依赖性DeepPoseKit它试图设置其long_description通过阅读该项目的README.md For whatever reason that README.md contains non ASCII characters around position 433 , which causes the python decoder to fail while executing the setup.py .无论出于何种原因, README.md在位置433附近包含非 ASCII 字符,这会导致 python 解码器在执行setup.py失败。

A : Please open an issue or pull request for this in the DeepPoseKit Repository .:请在DeepPoseKit 存储库中为此打开一个问题或拉取请求。 They are the only ones who can fix this issue properly.他们是唯一可以正确解决此问题的人。

The actual problem with the package is in this part of the README.md :包的实际问题在README.md 的这一部分:

using deep learning—written in Python

the (U+2014) is a non ASCII character. (U+2014) 是一个非 ASCII 字符。

Until the maintainers of the package fix this issue, you can apply the following workaround:在软件包的维护者解决此问题之前,您可以应用以下解决方法:

  1. Create a conda environment without DeepPoseKit创建没有 DeepPoseKit 的 conda 环境
  2. Enter that conda environment进入那个 conda 环境
  3. Clone the repository: git clone git@github.com:jgraving/DeepPoseKit.git克隆存储库: git clone git@github.com:jgraving/DeepPoseKit.git
  4. Truncate the README.md : echo > README.md截断README.mdecho > README.md
  5. Install the dependency manually: python setup.py install手动安装依赖: python setup.py install

Update更新

This should be fixed and merged with this pull request这应该修复并与此拉取请求合并

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 UnicodeDecodeError:&#39;ascii&#39;编解码器无法解码位置10894的字节0xe2:序数不在范围内(128) - UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 10894: ordinal not in range(128) Python 3 UnicodeDecodeError:&#39;ascii&#39;编解码器无法解码位置0中的字节0xe2:序数不在范围内(128) - Python 3 UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128) UnicodeDecodeError: &#39;ascii&#39; 编解码器无法解码位置 3131 中的字节 0x80:序号不在范围内 (128) - UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 3131: ordinal not in range(128) UnicodeDecodeError:&#39;ascii&#39;编解码器无法解码位置0的字节0xdb:序数不在范围内(128) - UnicodeDecodeError: 'ascii' codec can't decode byte 0xdb in position 0: ordinal not in range(128) UnicodeDecodeError:&#39;ascii&#39;编解码器无法解码位置6233的字节0xf0:序数不在范围内(128) - UnicodeDecodeError: 'ascii' codec can't decode byte 0xf0 in position 6233: ordinal not in range(128) UnicodeDecodeError:“ascii”编解码器无法解码 position 5 中的字节 0x80:序数不在范围内(128) - UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 5: ordinal not in range(128) 在明文.split(&#39;\\ n&#39;)中获取行:UnicodeDecodeError:&#39;ascii&#39;编解码器无法解码位置2中的字节0x96:序号不在范围内(128) - Getting for line in plaintext.split('\n'): UnicodeDecodeError: 'ascii' codec can't decode byte 0x96 in position 2: ordinal not in range(128) UnicodeDecodeError: &#39;utf-8&#39; 编解码器无法解码位置 1023 中的字节 0xe2:数据意外结束 - UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 1023: unexpected end of data UnicodeDecodeError:&#39;ascii&#39;编解码器无法解码位置2141的字节0xef:序数不在范围内(128) - UnicodeDecodeError: 'ascii' codec cant decode byte 0xef in position 2141: ordinal not in range(128) 面临问题:UnicodeDecodeError: &#39;ascii&#39; codec can&#39;t decode byte 0xc3 in position 918: ordinal not in range(128) while试图加载 Pytorch 模型 - Facing issue: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 918: ordinal not in range(128) while trying to load a Pytorch model
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM