Skip to main content
Tweeted twitter.com/StackOverflowPT/status/1079708917347860480
adicionou 279 caracteres ao conteúdo
Fonte Link
hkotsubo
  • 66,9mil
  • 25
  • 87
  • 170

Olá,
EstouEstou com dificuldades para criar um ambiente virtual com o pipenv, eu instalei ele sem problemas com o pip, o problema acontece na hora de criar o ambiente.
Estou utilizando o Windows 10 e o Python 3.7.

Eu tentei instalar o pipenv utilizando o comando
pip install pipenv
A:

pip install pipenv

A instalação não apresentou erros, mas deu problema ao tentar criar o ambiente. Então eu desinstalei tudo e tentei com
pip install --user pipenv,
ajustando:

pip install --user pipenv

Ajustando as variáveis de ambiente conforme explicado na documentação, mas também deu erro ao tentar criar o ambiente.
Tentei criar o ambiente virtual com os seguintes comandos:

    Creating a virtualenv for this project…
    Pipfile: C:\python\projeto\Pipfile
    Using c:\users\usuário\appdata\local\programs\python\python37-32\python.exe 
    (3.7.0) to create virtualenv…
    [=== ] Creating virtual environment...Already using interpreter 
    c:\users\usuário\appdata\local\programs\python\python37-32\python.exe
    Using base prefix 
    'c:\\users\\usuário\\appdata\\local\\programs\\python\\python37-32'
    New python executable in C:\python\projeto\.venv\Scripts\python.exe
    Installing setuptools, pip, wheel...
    Complete output from command C:\python\projeto\.venv\Scripts\python.exe - 
    setuptools pip wheel:
    Traceback (most recent call last):
    File "<stdin>", line 3, in <module>
    ModuleNotFoundError: No module named 'pkgutil'
    ----------------------------------------
    ...Installing setuptools, pip, wheel...done.
    Failed creating virtual environment
    [pipenv.exceptions.VirtualenvCreationException]:   File 
    "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\pipenv\cli\command.py", line 254, in install
    [pipenv.exceptions.VirtualenvCreationException]:       
    editable_packages=state.installstate.editables,
    [pipenv.exceptions.VirtualenvCreationException]:   File 
    "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\pipenv\core.py", line 1741, in do_install
    [pipenv.exceptions.VirtualenvCreationException]:       
    pypi_mirror=pypi_mirror,
    [pipenv.exceptions.VirtualenvCreationException]:   File 
    "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\pipenv\core.py", line 574, in ensure_project
    [pipenv.exceptions.VirtualenvCreationException]:       
    pypi_mirror=pypi_mirror,
    [pipenv.exceptions.VirtualenvCreationException]:   File 
    "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\pipenv\core.py", line 506, in ensure_virtualenv
    [pipenv.exceptions.VirtualenvCreationException]:       python=python, 
    site_packages=site_packages, pypi_mirror=pypi_mirror
    [pipenv.exceptions.VirtualenvCreationException]:   File 
    "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\pipenv\core.py", line 935, in do_create_virtualenv
    [pipenv.exceptions.VirtualenvCreationException]:       extra=[crayons.blue(" 
   {0}".format(c.err)),]
    [pipenv.exceptions.VirtualenvCreationException]: Traceback (most recent call 
    last):
    File "c:\users\usuário\appdata\local\programs\python\python37- 
   32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
    File "c:\users\usuário\appdata\local\programs\python\python37- 
   32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
    File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\virtualenv.py", line 2462, in <module>
    main()
    File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\virtualenv.py", line 762, in main
    symlink=options.symlink,
    File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\virtualenv.py", line 1015, in create_environment
    install_wheel(to_install, py_executable, search_dirs, download=download)
    File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\virtualenv.py", line 968, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
    File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\virtualenv.py", line 854, in call_subprocess
    raise OSError("Command {} failed with error code {}".format(cmd_desc, 
    proc.returncode))
    OSError: Command C:\python\projeto\.venv\Scripts\python.exe - setuptools pip 
    wheel failed with error code 1
    Failed to create virtual environment.

packages\pipenv\cli\command.py", line 254, in install [pipenv.exceptions.VirtualenvCreationException]:
editable_packages=state.installstate.editables, [pipenv.exceptions.VirtualenvCreationException]: File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\pipenv\core.py", line 1741, in do_install [pipenv.exceptions.VirtualenvCreationException]:
pypi_mirror=pypi_mirror, [pipenv.exceptions.VirtualenvCreationException]: File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\pipenv\core.py", line 574, in ensure_project [pipenv.exceptions.VirtualenvCreationException]:
pypi_mirror=pypi_mirror, [pipenv.exceptions.VirtualenvCreationException]: File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\pipenv\core.py", line 506, in ensure_virtualenv [pipenv.exceptions.VirtualenvCreationException]: python=python, site_packages=site_packages, pypi_mirror=pypi_mirror [pipenv.exceptions.VirtualenvCreationException]: File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\pipenv\core.py", line 935, in do_create_virtualenv [pipenv.exceptions.VirtualenvCreationException]: extra=[crayons.blue(" {0}".format(c.err)),] [pipenv.exceptions.VirtualenvCreationException]: Traceback (most recent call last): File "c:\users\usuário\appdata\local\programs\python\python37- 32\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\users\usuário\appdata\local\programs\python\python37- 32\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\virtualenv.py", line 2462, in main() File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\virtualenv.py", line 762, in main symlink=options.symlink, File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\virtualenv.py", line 1015, in create_environment install_wheel(to_install, py_executable, search_dirs, download=download) File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\virtualenv.py", line 968, in install_wheel call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT) File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\virtualenv.py", line 854, in call_subprocess raise OSError("Command {} failed with error code {}".format(cmd_desc, proc.returncode)) OSError: Command C:\python\projeto.venv\Scripts\python.exe - setuptools pip wheel failed with error code 1 Failed to create virtual environment.

Olá,
Estou com dificuldades para criar um ambiente virtual com o pipenv, eu instalei ele sem problemas com o pip, o problema acontece na hora de criar o ambiente.
Estou utilizando o Windows 10 e o Python 3.7.

Eu tentei instalar o pipenv utilizando o comando
pip install pipenv
A instalação não apresentou erros, mas deu problema ao tentar criar o ambiente. Então eu desinstalei tudo e tentei com
pip install --user pipenv,
ajustando as variáveis de ambiente conforme explicado na documentação, mas também deu erro ao tentar criar o ambiente.
Tentei criar o ambiente virtual com os seguintes comandos:

Creating a virtualenv for this project…
Pipfile: C:\python\projeto\Pipfile
Using c:\users\usuário\appdata\local\programs\python\python37-32\python.exe 
(3.7.0) to create virtualenv…
[=== ] Creating virtual environment...Already using interpreter 
c:\users\usuário\appdata\local\programs\python\python37-32\python.exe
Using base prefix 
'c:\\users\\usuário\\appdata\\local\\programs\\python\\python37-32'
New python executable in C:\python\projeto\.venv\Scripts\python.exe
Installing setuptools, pip, wheel...
Complete output from command C:\python\projeto\.venv\Scripts\python.exe - 
setuptools pip wheel:
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
ModuleNotFoundError: No module named 'pkgutil'
----------------------------------------
...Installing setuptools, pip, wheel...done.
Failed creating virtual environment
[pipenv.exceptions.VirtualenvCreationException]:   File 
"c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 

packages\pipenv\cli\command.py", line 254, in install [pipenv.exceptions.VirtualenvCreationException]:
editable_packages=state.installstate.editables, [pipenv.exceptions.VirtualenvCreationException]: File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\pipenv\core.py", line 1741, in do_install [pipenv.exceptions.VirtualenvCreationException]:
pypi_mirror=pypi_mirror, [pipenv.exceptions.VirtualenvCreationException]: File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\pipenv\core.py", line 574, in ensure_project [pipenv.exceptions.VirtualenvCreationException]:
pypi_mirror=pypi_mirror, [pipenv.exceptions.VirtualenvCreationException]: File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\pipenv\core.py", line 506, in ensure_virtualenv [pipenv.exceptions.VirtualenvCreationException]: python=python, site_packages=site_packages, pypi_mirror=pypi_mirror [pipenv.exceptions.VirtualenvCreationException]: File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\pipenv\core.py", line 935, in do_create_virtualenv [pipenv.exceptions.VirtualenvCreationException]: extra=[crayons.blue(" {0}".format(c.err)),] [pipenv.exceptions.VirtualenvCreationException]: Traceback (most recent call last): File "c:\users\usuário\appdata\local\programs\python\python37- 32\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\users\usuário\appdata\local\programs\python\python37- 32\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\virtualenv.py", line 2462, in main() File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\virtualenv.py", line 762, in main symlink=options.symlink, File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\virtualenv.py", line 1015, in create_environment install_wheel(to_install, py_executable, search_dirs, download=download) File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\virtualenv.py", line 968, in install_wheel call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT) File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\virtualenv.py", line 854, in call_subprocess raise OSError("Command {} failed with error code {}".format(cmd_desc, proc.returncode)) OSError: Command C:\python\projeto.venv\Scripts\python.exe - setuptools pip wheel failed with error code 1 Failed to create virtual environment.

Estou com dificuldades para criar um ambiente virtual com o pipenv, eu instalei ele sem problemas com o pip, o problema acontece na hora de criar o ambiente.
Estou utilizando o Windows 10 e o Python 3.7.

Eu tentei instalar o pipenv utilizando o comando:

pip install pipenv

A instalação não apresentou erros, mas deu problema ao tentar criar o ambiente. Então eu desinstalei tudo e tentei com:

pip install --user pipenv

Ajustando as variáveis de ambiente conforme explicado na documentação, mas também deu erro ao tentar criar o ambiente.
Tentei criar o ambiente virtual com os seguintes comandos:

    Creating a virtualenv for this project…
    Pipfile: C:\python\projeto\Pipfile
    Using c:\users\usuário\appdata\local\programs\python\python37-32\python.exe 
    (3.7.0) to create virtualenv…
    [=== ] Creating virtual environment...Already using interpreter 
    c:\users\usuário\appdata\local\programs\python\python37-32\python.exe
    Using base prefix 
    'c:\\users\\usuário\\appdata\\local\\programs\\python\\python37-32'
    New python executable in C:\python\projeto\.venv\Scripts\python.exe
    Installing setuptools, pip, wheel...
    Complete output from command C:\python\projeto\.venv\Scripts\python.exe - 
    setuptools pip wheel:
    Traceback (most recent call last):
    File "<stdin>", line 3, in <module>
    ModuleNotFoundError: No module named 'pkgutil'
    ----------------------------------------
    ...Installing setuptools, pip, wheel...done.
    Failed creating virtual environment
    [pipenv.exceptions.VirtualenvCreationException]:   File 
    "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\pipenv\cli\command.py", line 254, in install
    [pipenv.exceptions.VirtualenvCreationException]:       
    editable_packages=state.installstate.editables,
    [pipenv.exceptions.VirtualenvCreationException]:   File 
    "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\pipenv\core.py", line 1741, in do_install
    [pipenv.exceptions.VirtualenvCreationException]:       
    pypi_mirror=pypi_mirror,
    [pipenv.exceptions.VirtualenvCreationException]:   File 
    "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\pipenv\core.py", line 574, in ensure_project
    [pipenv.exceptions.VirtualenvCreationException]:       
    pypi_mirror=pypi_mirror,
    [pipenv.exceptions.VirtualenvCreationException]:   File 
    "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\pipenv\core.py", line 506, in ensure_virtualenv
    [pipenv.exceptions.VirtualenvCreationException]:       python=python, 
    site_packages=site_packages, pypi_mirror=pypi_mirror
    [pipenv.exceptions.VirtualenvCreationException]:   File 
    "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\pipenv\core.py", line 935, in do_create_virtualenv
    [pipenv.exceptions.VirtualenvCreationException]:       extra=[crayons.blue(" 
   {0}".format(c.err)),]
    [pipenv.exceptions.VirtualenvCreationException]: Traceback (most recent call 
    last):
    File "c:\users\usuário\appdata\local\programs\python\python37- 
   32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
    File "c:\users\usuário\appdata\local\programs\python\python37- 
   32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
    File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\virtualenv.py", line 2462, in <module>
    main()
    File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\virtualenv.py", line 762, in main
    symlink=options.symlink,
    File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\virtualenv.py", line 1015, in create_environment
    install_wheel(to_install, py_executable, search_dirs, download=download)
    File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\virtualenv.py", line 968, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
    File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 
   packages\virtualenv.py", line 854, in call_subprocess
    raise OSError("Command {} failed with error code {}".format(cmd_desc, 
    proc.returncode))
    OSError: Command C:\python\projeto\.venv\Scripts\python.exe - setuptools pip 
    wheel failed with error code 1
    Failed to create virtual environment.
Fonte Link
Gau
  • 238
  • 4
  • 13

Problemas ao tentar criar um ambiente virtual com pipenv

Olá,
Estou com dificuldades para criar um ambiente virtual com o pipenv, eu instalei ele sem problemas com o pip, o problema acontece na hora de criar o ambiente.
Estou utilizando o Windows 10 e o Python 3.7.

Eu tentei instalar o pipenv utilizando o comando
pip install pipenv
A instalação não apresentou erros, mas deu problema ao tentar criar o ambiente. Então eu desinstalei tudo e tentei com
pip install --user pipenv,
ajustando as variáveis de ambiente conforme explicado na documentação, mas também deu erro ao tentar criar o ambiente.
Tentei criar o ambiente virtual com os seguintes comandos:

pipenv install
pipenv install django
pipenv --three

O que me retorna:

Creating a virtualenv for this project…
Pipfile: C:\python\projeto\Pipfile
Using c:\users\usuário\appdata\local\programs\python\python37-32\python.exe 
(3.7.0) to create virtualenv…
[=== ] Creating virtual environment...Already using interpreter 
c:\users\usuário\appdata\local\programs\python\python37-32\python.exe
Using base prefix 
'c:\\users\\usuário\\appdata\\local\\programs\\python\\python37-32'
New python executable in C:\python\projeto\.venv\Scripts\python.exe
Installing setuptools, pip, wheel...
Complete output from command C:\python\projeto\.venv\Scripts\python.exe - 
setuptools pip wheel:
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
ModuleNotFoundError: No module named 'pkgutil'
----------------------------------------
...Installing setuptools, pip, wheel...done.
Failed creating virtual environment
[pipenv.exceptions.VirtualenvCreationException]:   File 
"c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- 

packages\pipenv\cli\command.py", line 254, in install [pipenv.exceptions.VirtualenvCreationException]:
editable_packages=state.installstate.editables, [pipenv.exceptions.VirtualenvCreationException]: File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\pipenv\core.py", line 1741, in do_install [pipenv.exceptions.VirtualenvCreationException]:
pypi_mirror=pypi_mirror, [pipenv.exceptions.VirtualenvCreationException]: File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\pipenv\core.py", line 574, in ensure_project [pipenv.exceptions.VirtualenvCreationException]:
pypi_mirror=pypi_mirror, [pipenv.exceptions.VirtualenvCreationException]: File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\pipenv\core.py", line 506, in ensure_virtualenv [pipenv.exceptions.VirtualenvCreationException]: python=python, site_packages=site_packages, pypi_mirror=pypi_mirror [pipenv.exceptions.VirtualenvCreationException]: File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\pipenv\core.py", line 935, in do_create_virtualenv [pipenv.exceptions.VirtualenvCreationException]: extra=[crayons.blue(" {0}".format(c.err)),] [pipenv.exceptions.VirtualenvCreationException]: Traceback (most recent call last): File "c:\users\usuário\appdata\local\programs\python\python37- 32\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\users\usuário\appdata\local\programs\python\python37- 32\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\virtualenv.py", line 2462, in main() File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\virtualenv.py", line 762, in main symlink=options.symlink, File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\virtualenv.py", line 1015, in create_environment install_wheel(to_install, py_executable, search_dirs, download=download) File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\virtualenv.py", line 968, in install_wheel call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT) File "c:\users\usuário\appdata\local\programs\python\python37-32\lib\site- packages\virtualenv.py", line 854, in call_subprocess raise OSError("Command {} failed with error code {}".format(cmd_desc, proc.returncode)) OSError: Command C:\python\projeto.venv\Scripts\python.exe - setuptools pip wheel failed with error code 1 Failed to create virtual environment.

Essa pergunta aqui não me ajudou muito nesse problema.

Alguém tem uma luz?