What's going on here? Typing commands sometimes executes stuff in the middle of typing. #2955
-
I've started having some weird issues lately where when I type commands sometimes it just seems to execute stuff and overwrites characters/lines in the output, the original input seems to still exist though because when I press enter it executes it correctly. Here's an example:
https://github.com/cmderdev/cmder/assets/11724363/7501dd61-6ef3-4117-b5cc-df508bf50bf0
It happens consistently with pip show pandas
, as soon as the last s
is typed, it spits out those errors and everything becomes a mess:
<string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
<string>:1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
Using the latest version of cmder_mini v1.3.25 on Windows 10
Beta Was this translation helpful? Give feedback.
All reactions
Here is the command that the pip completions are running:
python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
If you run that, you'll get the same error message.
I said the error is coming from pip, but what I mean is that the error is coming from pip or something that pip depends on, such as python.
The error message says that the "distutils" package in python is deprecated. The error message includes a suggestion to "Use setuptools or check PEP 632 for potential alternatives".
That's an issue in the python/pip installation. You'll have to resolve that in the python and/or pip installations. A good place to look for help could be in the pip repo, or in ano...
Replies: 1 comment 10 replies
-
@chrisant996 maybe related to Clink completions?
Beta Was this translation helpful? Give feedback.
All reactions
-
The error is coming from pip.
Completions are running pip to collect possible completions, and pip is reporting the error.
Two things need to happen:
- Update the pip installation according to the error message. (The user has to do that; it's a local installation issue.)
- I'll update the pip.lua script to redirect error output so it doesn't show up. (That's a bug in the pip completions script, and has probably existed for many years; certainly before I became the maintainer.)
Beta Was this translation helpful? Give feedback.
All reactions
-
As far as I can tell I now have the newest version of pip installed, but it's still happening.
Beta Was this translation helpful? Give feedback.
All reactions
-
Here is the command that the pip completions are running:
python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
If you run that, you'll get the same error message.
I said the error is coming from pip, but what I mean is that the error is coming from pip or something that pip depends on, such as python.
The error message says that the "distutils" package in python is deprecated. The error message includes a suggestion to "Use setuptools or check PEP 632 for potential alternatives".
That's an issue in the python/pip installation. You'll have to resolve that in the python and/or pip installations. A good place to look for help could be in the pip repo, or in another python related repo.
Beta Was this translation helpful? Give feedback.
All reactions
-
Also, I've made a fix in the pip completions to hide errors. But the error will still show up when running python commands, since the error is in the python and/or pip installation.
How to update clink-completions in Cmder: https://github.com/vladimir-kotikov/clink-completions#if-you-use-cmder
Beta Was this translation helpful? Give feedback.
All reactions
-
Alright, thank you! I'll try to update python or something, even though I need a specific version for a project. At least I know where the error lies now.
Beta Was this translation helpful? Give feedback.
All reactions
-
@TheHorscht just to make sure: did you catch that you can update click-completions to pick up the change I made in click-completions to hide the python error?
Here is how: https://github.com/vladimir-kotikov/clink-completions#if-you-use-cmder
Beta Was this translation helpful? Give feedback.
All reactions
-
Is it the same as running clink update
? I'll install them manually too just to be sure. I deleted everything python related, rebooted my PC and reinstalled the newest python version so I don't get the warning anymore anyways, so I can't test if the clink completions are fixed. Also, you said it's running python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
, but shouldn't that spit out an error if distutils no longer exist in the newer python versions? At least when I run the command manually now I get ModuleNotFoundError: No module named 'distutils'
. I also don't have python
in the PATH anymore, just the launcher shortcut py
, the typing suggestions work fine though.
Beta Was this translation helpful? Give feedback.