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
Last revisionBoth sides next revision
conda_notes [2023/07/30 01:56] – [which solver am I using?] adminconda_notes [2024/04/07 02:01] – [environment file to install from a specific git branch] raju
Line 38: 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 223: Line 227:
  
 ==== which solver am I using? ==== ==== which solver am I using? ====
 +Use
 <code> <code>
 conda config --show solver conda config --show solver
 </code> </code>
 +or
 +<code>
 +conda config --show-sources
 +</code>
 +
  
 Sample output: Sample output:
Line 236: Line 246:
 $ conda config --show solver $ conda config --show solver
 solver: libmamba solver: libmamba
 +</code>
 +
 +<code>
 +$conda config --show-sources
 +==> C:\Users\root\.condarc <==
 +solver: libmamba
 +
 +==> cmd_line <==
 +debug: False
 +json: False
 </code> </code>
  
 See also:- See also:-
   * https://conda.github.io/conda-libmamba-solver/getting-started/ - tells how to switch the default solver from classic to libmamba.   * 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 344: Line 384:
  
 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" 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" in conda environment file ====
 +<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"
  
 ===== dummy ===== ===== dummy =====
conda_notes.txt · Last modified: 2024/04/07 02:02 by raju