task_boiler
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
task_boiler [2023/05/21 02:01] – [See also] raju | task_boiler [2024/01/23 22:55] (current) – raju | ||
---|---|---|---|
Line 3: | Line 3: | ||
Start the first heading with " | Start the first heading with " | ||
- | |||
- | ===== conda environment file to install different packages from different channels ==== | ||
- | |||
- | ==== Background ==== | ||
- | |||
- | yfinance library is the easiest and fastest way to download historical stock prices. Asof 2023-05-20, it is not available in the defaults channel. But is available in the conda-forge channel. | ||
- | |||
- | ==== Task ==== | ||
- | |||
- | The goal here is to pull the yfinance package from conda-forge but everything else from the defaults channel. | ||
- | |||
- | ==== Solution ==== | ||
- | |||
- | < | ||
- | % cat env_test_yfinance.yml | stuff.py | ||
- | name: test_yfinance | ||
- | channels: | ||
- | - defaults | ||
- | dependencies: | ||
- | - python=3.11 | ||
- | - conda-forge:: | ||
- | </ | ||
- | |||
- | where stuff.py is a python script to strip out the comments. It can be downloaded from https:// | ||
- | |||
- | Create the environment | ||
- | |||
- | < | ||
- | % conda env create -f ./ | ||
- | </ | ||
- | |||
- | ==== Evidence ==== | ||
- | yfinance is downloaded from conda-forge. | ||
- | < | ||
- | % conda list -n test_yfinance | grep conda-forge | ||
- | multitasking | ||
- | yfinance | ||
- | </ | ||
- | |||
- | python is downloaded from the defaults channel | ||
- | < | ||
- | % conda list -n test_yfinance | grep " | ||
- | python | ||
- | python-dateutil | ||
- | </ | ||
- | |||
- | ==== See also ==== | ||
- | * The above environment file can be downloaded from https:// | ||
- | * I got the idea from https:// | ||
- | * The official documentation I could find on this feature is https:// | ||
task_boiler.1684634513.txt.gz · Last modified: 2023/05/21 02:01 by raju