question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

during a regular `pipenv install` pipenv writes "info" statements to standard error stream

See original GitHub issue

OS: Windows 10 x64 python --version : Python 3.7.0 pip --version : pip 18.0 from c:\program files\python37\lib\site-packages\pip (python 3.7) pipenv --version : pipenv, version 2018.7.1

Issue description

Create a new directory. cd to that directory. run pipenv install 1>out 2>err I don’t expect any errors so file out should contains some data and err shoudl be empty

Expected result

out file should contains pipenv install output. err should be empty

Actual result

out content :

Installing dependencies from Pipfile.lock (a65489)...
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

err output:

pipenv : Creating a virtualenv for this project...
At line:1 char:1
+ pipenv install 1>out 2>err
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Creating a virt...this project...:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Pipfile: C:\aceprocessors\testp2\Pipfile

Using c:\program files\python37\python.exe (3.7.0) to create virtualenv...

Already using interpreter c:\program files\python37\python.exe
Using base prefix 'c:\\program files\\python37'
c:\program files\python37\lib\site-packages\virtualenv.py:1041: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
New python executable in C:\aceprocessors\testp2\.venv\Scripts\python.exe
Installing setuptools, pip, wheel...done.


Virtualenv location: C:\aceprocessors\testp2\.venv

Creating a Pipfile for this project...

Pipfile.lock not found, creating...

Locking [dev-packages] dependencies...

Locking [packages] dependencies...

Updated Pipfile.lock (a65489)!

Steps to replicate

mkdir testp cd testp pipenv install 1>out 2>err (tested in cmd and powershell)


Please run $ pipenv --support, and paste the results here. Don’t put backticks (`) around it! The output already contains Markdown formatting.

$ pipenv --support

Pipenv version: '2018.7.1'

Pipenv location: 'c:\\program files\\python37\\lib\\site-packages\\pipenv'

Python location: 'c:\\program files\\python37\\python.exe'

Other Python installations in PATH:

  • 3.7: C:\Program Files\Python37\python.exe

  • 3.7.0: C:\Program Files\Python37\python.exe

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.7.0',
 'os_name': 'nt',
 'platform_machine': 'AMD64',
 'platform_python_implementation': 'CPython',
 'platform_release': '10',
 'platform_system': 'Windows',
 'platform_version': '10.0.17134',
 'python_full_version': '3.7.0',
 'python_version': '3.7',
 'sys_platform': 'win32'}

System environment variables:

  • ALLUSERSPROFILE
  • ANSICON
  • ANSICON_DEF
  • APPDATA
  • CHOCOLATEYPATH
  • COMMONPROGRAMFILES
  • COMMONPROGRAMFILES(X86)
  • COMMONPROGRAMW6432
  • COMPUTERNAME
  • COMSPEC
  • CONEMUANSI
  • CONEMUANSILOG
  • CONEMUARGS
  • CONEMUARGS2
  • CONEMUBACKHWND
  • CONEMUBASEDIR
  • CONEMUBASEDIRSHORT
  • CONEMUBUILD
  • CONEMUCFGDIR
  • CONEMUCONFIG
  • CONEMUDIR
  • CONEMUDRAWHWND
  • CONEMUDRIVE
  • CONEMUHOOKS
  • CONEMUHWND
  • CONEMUPALETTE
  • CONEMUPID
  • CONEMUSERVERPID
  • CONEMUTASK
  • CONEMUWORKDIR
  • CONEMUWORKDRIVE
  • DRIVERDATA
  • ERLANG_HOME
  • FSHARPINSTALLDIR
  • HOME
  • HOMEDRIVE
  • HOMEPATH
  • JAVA_HOME
  • LOCALAPPDATA
  • LOGONSERVER
  • MOZ_PLUGIN_PATH
  • NUGGIEREPOPATH
  • NUMBER_OF_PROCESSORS
  • ONEDRIVE
  • OS
  • PATH
  • PATHEXT
  • PIPENV_VENV_IN_PROJECT
  • PROCESSOR_ARCHITECTURE
  • PROCESSOR_IDENTIFIER
  • PROCESSOR_LEVEL
  • PROCESSOR_REVISION
  • PROGRAMDATA
  • PROGRAMFILES
  • PROGRAMFILES(X86)
  • PROGRAMW6432
  • PSMODULEPATH
  • PUBLIC
  • SESSIONNAME
  • SYSTEMDRIVE
  • SYSTEMROOT
  • TELERIKWPFDIR
  • TEMP
  • TMP
  • TVT
  • UATDATA
  • USERDNSDOMAIN
  • USERDOMAIN
  • USERDOMAIN_ROAMINGPROFILE
  • USERNAME
  • USERPROFILE
  • VBOX_MSI_INSTALL_PATH
  • VS140COMNTOOLS
  • WINDIR
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH

Pipenv?specific environment variables:

  • PIPENV_VENV_IN_PROJECT: 1

Debug?specific environment variables:

  • PATH: C:\Program Files\ConEmu\ConEmu\Scripts;C:\Program Files\Python37\Scripts\;C:\Program Files\Python37\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Python36\Scripts\;C:\Program Files\Python36\;C:\Program Files (x86)\Python36-32\Scripts\;C:\Program Files (x86)\Python36-32\;C:\Program Files\Docker\Docker\Resources\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\dotnet\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Gradle\gradle-4.1\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\Calibre2\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Airtame;C:\Program Files\Microsoft VS Code\bin;c:\programs\Microsoft.Net.Compilers.2.3.1\tools;c:\Users\fku-ext\AppData\Local\Programs\Git\bin;c:\programs\Ruby193\bin\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\WINDOWS\System32\OpenSSH\;C:\Ruby23-x64\bin;C:\programs\Ruby25-x64\bin;C:\Program Files\ConEmu\ConEmu\Scripts;C:\Program Files\ConEmu;C:\Program Files\ConEmu\ConEmu;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Python36-32\Scripts\;C:\Program Files (x86)\Python36-32\;C:\Program Files\Docker\Docker\Resources\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\dotnet\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Gradle\gradle-4.1\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\Calibre;C:\Users\fku-ext\AppData\Local\Microsoft\WindowsApps

Contents of Pipfile (‘C:\aceprocessors\testp2\Pipfile’):

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]

[dev-packages]

[requires]
python_version = "3.7"

Contents of Pipfile.lock (‘C:\aceprocessors\testp2\Pipfile.lock’):

{
    "_meta": {
        "hash": {
            "sha256": "7e7ef69da7248742e869378f8421880cf8f0017f96d94d086813baa518a65489"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.7"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {},
    "develop": {}
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
inweniscommented, Oct 9, 2018

@techalchemy thank you for the explanation. Do you maybe have any any hints on this scenario: We run pipenv instal form our CI server, beaucse info statements written to std_err it’s hard to tell if pipenv install was actuall successfull or not. Currently I swallow all messages from std_err and std_out, if after running pipenv install the directoy .venv does not exists we print both captured streams as error.

1reaction
inweniscommented, Aug 9, 2019

I ended up using this:

                Write-Host "        => Running 'pipenv install'"
                pipenv install --deploy 2>&1 |
                    % { $_ -split "`n" } |
                    ? { -not([String]::IsNullOrWhiteSpace($_)) } |
                    % { Write-Host "          => $_"}
                if ($LastExitCode -ne 0) {
                    Write-Host "        => Running 'pipenv install' did not complete successfully"
                    return $false
                }
                return $true;
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to intercept "pipenv install" spinner-like output ...
It uses an argument "write_to_stdout=False", which I think means that it writes it on stderr. So why do I not see it on...
Read more >
pipenv Documentation
Pipenv is a tool that aims to bring the best of all packaging worlds (bundler, composer, npm, cargo, yarn, etc.) to the. Python...
Read more >
Pipenv: promises a lot, delivers very little
I want to write them in Markdown syntax, so I run pipenv install Markdown , and a few long seconds later, it's added...
Read more >
Pipenv: A Guide to the New Python Packaging Tool
Pipenv is a packaging tool for Python that solves some common problems associated with the typical workflow using pip, virtualenv, and the good...
Read more >
How to capture stdout/stderr output
Default stdout/stderr/stdin capturing behaviour¶. During test execution any output sent to stdout and stderr is captured. If a test or a setup method...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found