gpt4 book ai didi

python - virtualenvwrapper CentOS7

转载 作者:太空宇宙 更新时间:2023-11-03 17:21:43 24 4
gpt4 key购买 nike

我尝试使用 pip 在 CentOS 7 上使用 virtualenvwrapper 设置 virtualenv,但出现 UnicodeDecode 错误。

具体步骤:

  • 安装CentOS7
  • 通过 get-pip.py 安装 pip
  • sudo pip install virtualenv
  • sudo pip install virtualenvwrapper
  • export WORKON_HOME=$HOME/.virtualenvs
  • 来源/usr/local/bin/virtualenvwrapper.sh

当我运行 mkvirtualenv test 时我明白了

 New python executable in test/bin/python
Traceback (most recent call last):
File "<string>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 11 ordinal not in range(128)
ERROR: The executable Blog/bin/python is not functioning
ERROR: It thinks sys.prefix is u'/home/blaw/\xac./virtualenvs' (should be u'/home/blaw/\xac./virtualenvs/Blog')
ERROR: virtualenv is not compatible with this system or executable

我做错了什么?

最佳答案

echo 'export WORKON_HOME=$HOME/.virtualenvs' >> ~/.bashrc

echo 'source /usr/bin/virtualenvwrapper.sh' >> ~/.bashrc

source ~/.bashrc

mkvirtualenv test

那应该没问题。

关于python - virtualenvwrapper CentOS7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31143486/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com