User Tools

Site Tools


conda_notes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
conda_notes [2023/07/10 04:33] – [install zip file] rajuconda_notes [2024/04/07 02:02] (current) – [specify package version with "git+https" in conda environment file] raju
Line 2: Line 2:
 ==== tasks ==== ==== tasks ====
   * [[conda environment file to install different packages from different channels]]   * [[conda environment file to install different packages from different channels]]
 +    * tags | conda-forge::foo
  
 ==== Remove an environment ==== ==== Remove an environment ====
Line 37: Line 38:
  
 ==== update conda ==== ==== update conda ====
 +<code>
 +conda update -n base -c defaults conda --repodata-fn=repodata.json
 +</code>
 +
 <code> <code>
 conda update -n <env_name> -c defaults --yes conda conda update -n <env_name> -c defaults --yes conda
Line 220: Line 225:
   * conda config - https://docs.conda.io/projects/conda/en/latest/commands/config.html   * conda config - https://docs.conda.io/projects/conda/en/latest/commands/config.html
   * pinning packages - https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#preventing-packages-from-updating-pinning   * pinning packages - https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#preventing-packages-from-updating-pinning
 +
 +==== which solver am I using? ====
 +Use
 +<code>
 +conda config --show solver
 +</code>
 +or
 +<code>
 +conda config --show-sources
 +</code>
 +
 +
 +Sample output:
 +<code>
 +$ conda config --show solver
 +solver: classic
 +</code>
 +
 +<code>
 +$ conda config --show solver
 +solver: libmamba
 +</code>
 +
 +<code>
 +$conda config --show-sources
 +==> C:\Users\root\.condarc <==
 +solver: libmamba
 +
 +==> cmd_line <==
 +debug: False
 +json: False
 +</code>
 +
 +See also:-
 +  * https://conda.github.io/conda-libmamba-solver/getting-started/ - tells how to switch the default solver from classic to libmamba.
 +
 +==== when was a conda environment created? ====
 +<code>
 +conda env list | grep -v '^#' | perl -lane 'print $F[-1]' | xargs ls -lrt1d
 +</code>
 +
 +For example
 +<code>
 + % conda env list | grep -v '^#' | perl -lane 'print $F[-1]' | xargs ls -lrt1d
 +drwxr-xr-x 10 rajulocal rajulocal 4096 Apr  4  2020 /opt/rajulocal/miniconda3/envs/rutils
 +drwxr-xr-x 23 rajulocal rajulocal 4096 Nov  8  2021 /opt/rajulocal/miniconda3/envs/py39
 +drwxr-xr-x 13 rajulocal rajulocal 4096 Jun  6  2022 /opt/rajulocal/miniconda3/envs/play_ground
 +drwxr-xr-x 27 rajulocal rajulocal 4096 Feb 28  2023 /opt/rajulocal/miniconda3/envs/py310
 +drwxr-xr-x 13 rajulocal rajulocal 4096 May 20  2023 /opt/rajulocal/miniconda3/envs/test_yfinance
 +drwxr-xr-x 18 rajulocal rajulocal 4096 Jun 30 00:45 /opt/rajulocal/miniconda3
 +drwxr-xr-x 27 rajulocal rajulocal 4096 Jul 11 01:07 /opt/rajulocal/miniconda3/envs/py311
 +drwxr-xr-x 24 rajulocal rajulocal 4096 Nov 12 04:44 /opt/rajulocal/miniconda3/envs/market_data_processor
 +</code>
 +
 +Ref: https://stackoverflow.com/questions/69109316/how-can-i-see-the-creation-dates-for-my-conda-environments
  
 ===== activate conda environment ===== ===== activate conda environment =====
Line 323: Line 383:
   * https://manpages.debian.org/bookworm/python3-pip/pip.1.en.html - where I found the <nowiki>--find-links</nowiki> option   * https://manpages.debian.org/bookworm/python3-pip/pip.1.en.html - where I found the <nowiki>--find-links</nowiki> option
  
-tags | <nowiki>--find-links</nowiki>, pip config local packages, how to specify local repo location for pip packages+tags | <nowiki>--find-links</nowiki>, pip config local packages, how to specify local repo location for pip packages, conda install pip package from a "local directory" 
 + 
 +==== specify package version with git+https ==== 
 +<code> 
 +name: test_chessli 
 +channels: 
 +  - defaults 
 +dependencies: 
 +  - python=3.11 
 +  - pandas=1.5.3 
 +  - pip 
 +  - pip: 
 +    - chessli 
 +    - git+https://github.com/lervag/apy.git@v0.6.0#egg=apy 
 +</code> 
 + 
 +Ref:- 
 +  * https://stackoverflow.com/questions/47617552/how-can-i-specify-a-custom-git-branch-in-my-pipfile - where I found the answer 
 +  * https://github.com/lervag/apy/tags?after=v0.9.1 - versions of the api package < 0.9.1 
 + 
 +tags | pip "git+https" release, conda "git+https" release, conda git depend on a "specific release", specify package version with git+https in conda environment file
  
 ===== dummy ===== ===== dummy =====
conda_notes.1688963583.txt.gz · Last modified: 2023/07/10 04:33 by raju