-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Using pipenv shell or other pip commands shows AttributeError: 'AnsiToWin32' object has no attribute 'fileno' #5560
Comments
This is related to rich transition. Are you using Python 32bit or 64bit? |
@oz123 I am using python 64 bit and i downloaded python from python.org and ran the .exe |
It´s a bug, Version 2022.11.30 work fine |
I can't reproduce it. Let's try and find why my system is working and yours isn't:
My support output: Pipenv version: Pipenv location: Python location: OS Name: User pip version: user Python installations found:
PEP 508 Information:
System environment variables:
Pipenv–specific environment variables:
Debug–specific environment variables:
Contents of
|
@josejfg Thanks alot, this version seems to work fine. |
It's possible this is a windows regression when we switched to the rich console ... Can anyone re-check this with |
This probably won’t make any sense as far as a cause for the problem but a few days ago I upgraded from a really old version of pipenv (probably over a year old) to the latest (not sure if it was 2023.2.4 or 2023.2.18 as I don't remember exactly what day it was). It was working fine. I had it installed as --user at the time. I always keep my system installs clean. I have python 3.8.12 and python 3.7.12 installed with python 3.8.12 being the one on PATH and where pipenv was installed. Yesterday I was looking at pipx for installing some other packages and I decided change my pipenv install to using pipx. I did so by deleting the Python38 user folder (not sure if I should have uninstalled pipenv first? but I didn't), installing pipx as --user to recreate it, and finally installing pipenv using pipx. Now I am getting this error. However when I uninstall pipenv with pipx and reinstall pipenv as --user I still get this error (tried installing both 2023.2.4 and 2023.2.18, same error result). So maybe it has nothing to do with it. It’s possible I did something else to my system while I was playing around with pipx but I don’t know what it would have been. Just wanted to share in case it was helpful. Like others have mentioned, 2022.11.30 works fine (installed as user and installed with pipx) so I will just continue to use that version for now and hope this gets solved in some future version. |
@BrianZ111 I would not expect this to get solved in a future version as we plan to convert more of the click.echo/click.secho code to use the rich console, which is where this error is originating. I never understood the guidance in our docs about pipx, and I think at this point I'd like to remove that recommendation to use pipx for anything pipenv related. It definitely sounds like you are getting some cross package import issues between two different versions of pipenv. For me, it works fine on Windows. |
pipenv, version 2023.2.18 Traceback (most recent call last)
|
@snooppr its not obviously broken -- for one Windows 7 is EOL so I won't be able to help support that OS but on Windows 11 its working fine for me, so not obvious:
|
I think this is really an issue caused by some weird behavior of the windows terminal in older versions which aren't compatible with rich. |
Rich supports old windows terminals, I actively and successfully use rich v13.0.1 on Windows 7. When rich broke something in my project, I usually opened issues in rich and fixed it there. |
Well, in that case, you can open an issue with rich. It's been said already we can't support windows 7 with our limited resources. |
I recently got into python and django and decided to use
pipenv
for virtual environments, it installed just fine.But when using
pipenv shell
or other pipenv commands likepipenv install requests
. I always get the following error (on Windows cmd/powershell)pipenv shell
shows the error below.Running
$ pipenv --support
, gave the following output:$ pipenv --support
Pipenv version:
'2022.12.19'
Pipenv location:
'C:\\Users\\samue\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\pipenv'
Python location:
'C:\\Users\\samue\\AppData\\Local\\Programs\\Python\\Python310\\python.exe'
OS Name:
'nt'
User pip version:
'22.3.1'
user Python installations found:
3.10.9
:C:\Users\samue\AppData\Local\Programs\Python\Python310\python.exe
PEP 508 Information:
System environment variables:
ALLUSERSPROFILE
APPDATA
COMMONPROGRAMFILES
COMMONPROGRAMFILES(X86)
COMMONPROGRAMW6432
COMPUTERNAME
COMSPEC
DRIVERDATA
FPS_BROWSER_APP_PROFILE_STRING
FPS_BROWSER_USER_PROFILE_STRING
HOMEDRIVE
HOMEPATH
LOCALAPPDATA
LOGONSERVER
NUMBER_OF_PROCESSORS
ONEDRIVE
ONEDRIVECONSUMER
OS
PATH
PATHEXT
PROCESSOR_ARCHITECTURE
PROCESSOR_IDENTIFIER
PROCESSOR_LEVEL
PROCESSOR_REVISION
PROGRAMDATA
PROGRAMFILES
PROGRAMFILES(X86)
PROGRAMW6432
PSMODULEPATH
PUBLIC
SESSIONNAME
SYNAPROGDIR
SYSTEMDRIVE
SYSTEMROOT
TEMP
TMP
USERDOMAIN
USERDOMAIN_ROAMINGPROFILE
USERNAME
USERPROFILE
WINDIR
ZES_ENABLE_SYSMAN
PIP_DISABLE_PIP_VERSION_CHECK
PIP_PYTHON_PATH
PYTHONDONTWRITEBYTECODE
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv?specific environment variables:
Debug?specific environment variables:
PATH
:C:\Program Files\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\Java\jdk-19\bin;C:\Users\samue\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\samue\AppData\Local\Programs\Python\Python310\;C:\Users\samue\AppData\Local\Microsoft\WindowsApps;C:\src\flutter\bin;C:\Users\samue\AppData\Local\Programs\Microsoft VS Code\bin;C:\src\flutter\bin\cache\dart-sdk\bin
PS: I tried this on python 3.11.1 and had the same issue.
The text was updated successfully, but these errors were encountered: