New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pipenv run suppresses OpenSSH on Windows 10 #3637
Comments
This happens in both |
The issue appears to be in https://github.com/pypa/pipenv/blob/master/pipenv/shells.py#L57-L62 If I try running that function in isolation the problem can be reproduced. If I remove the windows codepath and run the posix codepath in Windows OpenSSH remains available. |
Works for me.
My guess is you have a problem in how your PATH is set up. It’d be very helpful if you could provide information on your environment, like those listed in the issue template. |
@uranusjr I did follow the template, the environment variables were included in the support output, so that's in the original ticket. I can confirm it is not a PATH issue, as I am unable to cd into |
I believe it is ( Edit: The fact you cannot |
To confirm the above, and maybe help with reproducing this issue: Running ssh
Running dir
|
Sorry, I missed the I'm nervous about assuming this a misconfiguration on my end, as this is on a laptop that was bought from a shop in the last month and has been very minimally used. I don't think I've had a chance to mess up its environment. |
Okay, some more investigation results this morning.
Based on these two, I think this is indeed a permissions issue, and that it's Python that can't see ssh. Given pipenv's architecture I'm not sure this is something you can fix, but I'm still a bit lost as to the root cause, so could be mistaken here. |
If it is indeed permission, the question becomes why would a nedtwd shell causes it. Is your current user an admin? Is Pipenv installed in the user domain, or system? (Honestly I am not very sure what could be causing this.) |
Indeed, very good questions. The current user is an admin, the machine came with Windows preinstalled with an admin user called "micro" (honestly, I've not used Windows much so don't know if that's common). Pipenv is installed into user scope in Python 3.7 (so, I've ensured that the Windows install is fully up-to-date and have tried removing and re-adding the OpenSSH Client, still nothing. |
@MatthewWilkes is this still an issue for you? Have you tried the latest version of pipenv? |
Issue description
Windows 10 supplies OpenSSH as an optional feature. When this is activated the
ssh
command works as is familiar from POSIX systems. However, any command invoked bypipenv run
or the environment found throughpipenv shell
fail to be able to use this command.Expected result
The command sequence:
pipenv shell
ssh
should result in the ssh usage prompt on machines with the OpenSSH Client optional feature installed
Actual result
A command not found error is shown.
Steps to replicate
As above, enable OpenSSH server, then you will be unable to run ssh after
pipenv shell
until you exit the environment.$ pipenv --support
Pipenv version:
'2018.11.26'
Pipenv location:
'C:\\Users\\micro\\AppData\\Roaming\\Python\\Python37\\site-packages\\pipenv'
Python location:
'c:\\users\\micro\\appdata\\local\\programs\\python\\python37-32\\python.exe'
Python installations found:
3.8.0a1
:C:\Users\micro\AppData\Local\Programs\Python\Python38\python.exe
3.8.0a1
:C:\Users\micro\AppData\Local\Programs\Python\Python38-32\python.exe
3.7.2
:C:\Users\micro\AppData\Local\Programs\Python\Python37-32\python.exe
PEP 508 Information:
System environment variables:
ALLUSERSPROFILE
APPDATA
COMMONPROGRAMFILES
COMMONPROGRAMFILES(X86)
COMMONPROGRAMW6432
COMPUTERNAME
COMSPEC
FPS_BROWSER_APP_PROFILE_STRING
FPS_BROWSER_USER_PROFILE_STRING
HOMEDRIVE
HOMEPATH
LOCALAPPDATA
LOGONSERVER
NUMBER_OF_PROCESSORS
ONEDRIVE
OS
PATH
PATHEXT
PROCESSOR_ARCHITECTURE
PROCESSOR_ARCHITEW6432
PROCESSOR_IDENTIFIER
PROCESSOR_LEVEL
PROCESSOR_REVISION
PROGRAMDATA
PROGRAMFILES
PROGRAMFILES(X86)
PROGRAMW6432
PSMODULEPATH
PUBLIC
SESSIONNAME
SYSTEMDRIVE
SYSTEMROOT
TEMP
TMP
USERDOMAIN
USERDOMAIN_ROAMINGPROFILE
USERNAME
USERPROFILE
WINDIR
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PIP_SHIMS_BASE_MODULE
PIP_PYTHON_PATH
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv?specific environment variables:
Debug?specific environment variables:
PATH
:C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\micro\AppData\Roaming\Python\Python37\Scripts\;C:\Windows\System32\OpenSSH\;C:\Windows\System32\OpenSSH;C:\Users\micro\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Users\micro\AppData\Local\Programs\Python\Python37-32\;C:\Users\micro\AppData\Local\Microsoft\WindowsApps;C:\Users\micro\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\micro\AppData\Roaming\Python\Python37\Scripts;C:\Windows\System32\OpenSSH;
Contents of
Pipfile
('C:\Users\micro\Pipfile'):The text was updated successfully, but these errors were encountered: