V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
15874103329
V2EX  ›  Python

[新人求教] 无法创建 pipenv 虚拟环境

  •  
  •   15874103329 · 2018-11-24 15:30:14 +08:00 · 4499 次点击
    这是一个创建于 2224 天前的主题,其中的信息可能已经有所发展或是发生改变。
    安装好 pipenv 后在 cmd 输入:pipenv install 显示如下:
    Traceback (most recent call last):
    File "c:\programdata\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
    File "c:\programdata\anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
    File "C:\ProgramData\Anaconda3\Scripts\pipenv.exe\__main__.py", line 5, in <module>
    File "c:\programdata\anaconda3\lib\site-packages\pipenv\__init__.py", line 47, in <module>
    from .cli import cli
    File "c:\programdata\anaconda3\lib\site-packages\pipenv\cli\__init__.py", line 3, in <module>
    from .command import cli
    File "c:\programdata\anaconda3\lib\site-packages\pipenv\cli\command.py", line 7, in <module>
    import crayons
    File "c:\programdata\anaconda3\lib\site-packages\pipenv\patched\crayons.py", line 49, in <module>
    is_powershell = "powershell" in shellingham.detect_shell()[0]
    File "c:\programdata\anaconda3\lib\site-packages\pipenv\vendor\shellingham\__init__.py", line 22, in detect_shell
    shell = get_shell(pid, max_depth=max_depth)
    File "c:\programdata\anaconda3\lib\site-packages\pipenv\vendor\shellingham\nt.py", line 100, in get_shell
    processes = dict(_iter_process())
    File "c:\programdata\anaconda3\lib\site-packages\pipenv\vendor\shellingham\nt.py", line 78, in _iter_process
    info = {'executable': str(pe.szExeFile.decode('utf-8'))}
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd7 in position 0: invalid continuation byte

    求老哥们帮帮忙
    7 条回复    2018-11-25 17:19:16 +08:00
    e2541
        1
    e2541  
       2018-11-24 15:51:55 +08:00
    pip 和 pipenv 是什么版本
    15874103329
        2
    15874103329  
    OP
       2018-11-24 16:02:26 +08:00
    pipenv==2018.11.14
    pip 18.1 from c:\programdata\anaconda3\lib\site-packages\pip (python 3.7)
    Sylv
        3
    Sylv  
       2018-11-24 17:27:39 +08:00
    八成和终端的编码有关系。
    LokiSharp
        4
    LokiSharp  
       2018-11-24 17:48:54 +08:00 via iPhone
    初学别用 windows 调平台就要半天,不装 vs 一堆包要手动装
    likuku
        5
    likuku  
       2018-11-24 18:20:51 +08:00
    要么换 virtualenv 试试呢
    buildblock
        6
    buildblock  
       2018-11-25 03:41:53 +08:00 via iPhone
    装一个 docker 或者 bash on ubuntu 吧 之前在 Windows 下搞环境真是要把我玩吐血了…像我这种老鸟都受不鸟,初学者就更别说了…
    Eds1995
        7
    Eds1995  
       2018-11-25 17:19:16 +08:00
    看一下 locale 设置
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1760 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 16:31 · PVG 00:31 · LAX 08:31 · JFK 11:31
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.