pip config and $EDITOR containing arguments
See original GitHub issueEnvironment
- pip version: 19.2.3
- Python version: 3.8
- OS: Linux
Description
pip config edit
is supposed to open the program specified by environment variable Editor if it’s set. Actually if the env is a program with its options, pip will treat the whole thing as the program name and throws a FileNotFoundError.
Expected behavior
pip config edit open the editor with options set.
How to Reproduce
export EDITOR="nvim --noplugin"; pip config edit
Output
ERROR: Exception:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 188, in main
status = self.run(options, args)
File "/usr/lib/python3.8/site-packages/pip/_internal/commands/configuration.py", line 136, in run
handlers[action](options, args[1:])
File "/usr/lib/python3.8/site-packages/pip/_internal/commands/configuration.py", line 216, in open_in_editor
subprocess.check_call([editor, fname])
File "/usr/lib/python3.8/subprocess.py", line 359, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib/python3.8/subprocess.py", line 340, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'nvim #--noplugin'
My Fix #7391
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:26 (22 by maintainers)
Top Results From Across the Web
pip config - pip documentation v22.3.1
list: List the active configuration (or from the file specified). edit: Edit the configuration file in an editor. get: Get the value associated...
Read more >Updating the pip.conf file to use https - Stack Overflow
I have reinstalled pypi few times on few servers with Ubuntu 12.04 and all was working well without problems. pip is a tool...
Read more >pip Documentation - Read the Docs
Logically, a Requirements file is just a list of pip install arguments placed in a file. Note that you should not rely on....
Read more >User Guide — pip 8.1.1 documentation
pip allows you to set all command line option defaults in a standard ini style config file. The names and locations of the...
Read more >config-argument-parser - PyPI
A package help automatically create command-line interface from configuration or code. It contains two modules CAP ( ConfigArgumentParser ) and TAP ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I feel we should yield and just use
shell=True
if needed. I still think it’s wrong, but it is what users expect because everybody is doing it.On Windows it would also need to check
PATHEXT
. And we’d need tests for the same. Given that, I would no longer implement this for Python 2. We can just use the existing behavior for Python 2 and handle args in Python 3.