Closed dmarx closed 2 years ago
https://pip.pypa.io/en/latest/user_guide/#using-pip-from-your-program
subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'my_package'])
I suspect there are probably cases where the package isn't actually installable, but still has a requirements.txt that we should run. Could separately detect that.
for packages that are installable, maybe throw an error and tell the user how to install from pip using the git+
syntax?
you know what, nah. not even. don't even touch requirements.txt. If the user needs anything from their, they can install that stuff with pip. This is unstable enough without it making decisions on behalf of the user about additional dependencies to install.
so let's do this: keep this open and call this a low priority feature to add WARNINGS if any of the following are found in the project root: setup.py, setup.cfg, pyproject.toml, poetry.lock, requirements.txt, envrionment.yaml, environment.yml, Dockerfile,... whatever that ML-specific docker-esque tool is, etc.
E.g. if setup.py is present, invoke pip install
Simplest solution here might be to just assume it is installable and attempt to install? If install is successful, probably want to move it out of the napm dir since napm will be on the pythonpath.