---
# System prepended metadata

title: 'Galsim, Conda etc'

---

## GalSim, Conda diary ##

**Basic Conda work**

(To Maya): This section may not be relevant to you if `conda info` confirms that your conda version is 23.something. If you see an older version, try the steps below.

1. Conda already exists on desktop. 
2. Updated Conda to the latest version with `conda update conda` (This didn't actually work, see step 9 below).
3. Only one environment exists: `base`. 
4. Created new (empty) test environment with `conda create --name condatest`
5. Ran `spyder` in base environment. Runs. 
6. Activated condatest with `conda activate condatest`.
7. Ran `spyder` again. Not found. This shows that the base environment is **not** visible to other environmets: when an environment is activated, stuff in base is not available.
8. Can't run anaconda-navigator. Hmm.
9. Very strange bug(???):

![image](https://hackmd.io/_uploads/BJ6d7rUlC.png =380x200)

10. Running this conda update generates the exact same output. Anaconda-navigator still refuses to run. 
11. Trying [this solution](https://stackoverflow.com/questions/73974735/conda-update-conda-does-not-update-conda): `conda install python=3.10 conda=23.5`
12. Works hard...

![Screenshot 2024-04-11 at 10.49.57 PM](https://hackmd.io/_uploads/Syf3iS8e0.png)

13. Aborted it. 
14. Tried instead, following [this recommendation](https://github.com/conda/conda/issues/12155): `conda install python=3.11 conda=23.5 --name base --override-channels --channel defaults --all`
15. Got a whole fuckload of downloads and *downgrades*. Multiple screens. 

![image](https://hackmd.io/_uploads/rynLRB8g0.png)

16. After running the above, conda info reports a correct Conda version 23.5.2. Much better.
17. `anaconda-navigator` now also runs, with a few errors visible when launched from command line. 
18. Just to be safe, removed `condatest` with `conda env remove --name condatest`.
19. Ran `conda update conda` again, to see if persistent error can be resolved. Strangely it's doing a bunch of stuff.
20. Nope. Persistent error still here: "Could not load conda plugin `anaconda-cloud-auth`:" and "cannot import name 'ChannelAuthBase' from 'conda.plugins.types' "
21. Ran `conda uninstall anaconda-cloud-auth` and the problem went away.
22. Reinstalled it. Problem isn't popping up again.
23. Checked current version of python using `python -V`. It's 3.11.7.


**At this point I feel conda is stable enough to start testing galsim etc.**

---

**Deplying superbit-metacal**

1. Working under `~/Code`.
2. cloned the superbit repo using `git clone https://github.com/superbit-collaboration/superbit-metacal.git`
3. This created a `superbit-metacal` folder under `~/Code`, as expected. 
4. Now running `conda env create --name sbmcal_139 --file env_v1.3.9.yaml`.
5. Expecting this to take a while... it took an hour or more last weekend. 



