Supporting conda install in kedro install command
See original GitHub issueDescription
Frequently in data science projects we need to use conda install
to handle packages that require configuration / building steps after installation.
Context
I am currently doing a data science project in Kedro which uses deep learning. In this situation using conda install is important as it allows me to handle CUDA/cuDNN dependencies within the ecosystem.
This enhancement fits naturally as most Kedro installations use conda to create virtual environments anyway.
Possible Implementation
If someone creates a file called requirements_conda.txt in the src folder the following code should work to install via pip and conda.
@cli.command()
def install():
"""Install project dependencies from requirements.txt."""
python_call("pip", ["install", "-U", "-r", "src/requirements.txt"])
os.system('conda install --file src/requirements_conda.txt --yes')
I’d be happy to contribute the code myself, but I was wondering if this is something that you all envisioned supporting?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:16 (2 by maintainers)
Top Results From Across the Web
Install Kedro — Kedro 0.18.4 documentation
To install Kedro from the Python Package Index (PyPI):. pip install kedro. Copy to clipboard. Note. It is also possible to install Kedro...
Read more >Install Kedro — Kedro 0.17.4 documentation
To install Kedro from the Python Package Index (PyPI) simply run: pip ... Both pip and conda install the core Kedro module, which...
Read more >Installation prerequisites — Kedro 0.17.7 documentation
Install conda on your computer. ... The conda virtual environment is not dependent on your current working directory and can be activated from...
Read more >Install Kedro — Kedro 0.17.7 documentation
To install Kedro from the Python Package Index (PyPI) simply run: pip ... Both pip and conda install the core Kedro module, which...
Read more >Installation guide — kedro-mlflow 0.11.5 documentation
I strongly recommend to use conda (a package manager) to create an environment in order to avoid version conflicts between packages. I also...
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
Hi, Not sure this issue has been resolved. I have seen the change that has been made. But I still get the following error when I run
kedro install
with an environment.yml file:And this is in alignment with https://github.com/conda/conda/issues/6827#issuecomment-365614464
I believe instead of running
conda install
… it needs to change toconda env create --file envname.yml
.Following up on this issue (I am aware that the changes are already incorporated in master): I used the
kedro install
version that usesconda env update --file src/environment.yml --prune
After this step, I got the message about activating the newly created environment. After this, however, kedro goes through the process of further processing the dependencies mentioned inrequirements.txt
. Is this the intended behaviour? As far as I understand those packages will anyway not be installed in the env created through theenvironment.yml
file. For my purposes, I already included all the packages fromrequirements.txt
inenvironment.yml
beforehand. Deleting or renaming therequirements.txt
file only leads to kedro complaining that the file can’t be found.I am just wondering whether it would be better that
kedro install
stops after the new env is created fromenvironment.yml
and not processrequirements.txt
too? and perhaps also activate the newly created environment in the same step.I am happy to make the relevant changes and raise a PR.