As noted previously, pip is a command line program. While it is implemented in Python, and so is available from your Python code via import pip, you must not use pip’s internal APIs in this way. There are a number of reasons for this: ...
Ignoring that this text is written against using pip in python which isn't really what's meant by doing -m pip I still think this is silly.
2
u/[deleted] Jul 21 '22
I thought using pip as a module was discouraged?
Ignoring that this text is written against using pip in python which isn't really what's meant by doing
-m pipI still think this is silly.Understand your environment and you won't have a problem. This approach is sort of the result of an X-Y problem.