Upgrading x86 Anaconda to M1 ARM version - anaconda

I'm currently using the x86 version of Anaconda on my M1 Mac as I installed it early 2022. How can I upgrade my Anaconda installation to the M1 version? Do I have to remove the old installation and install the new version or is there any chance to upgrade my installation?
I tried using conda update --all but it seems to keep the Intel version for Anaconda and Python.

Related

How to install Python 3.10 on the base enviornment of Anaconda?

I have python 3.9 installed in the anaconda base environment and have trouble installing the latest 3.10 version. I have tried to use "conda install -c conda-forge python=3.10" but it does not help resolve my problem. Over half a day, I have iteratively applied the command in the terminal but the package would not be installed. Any suggestion?
I've tried to use "conda install -c conda-forge python=3.10" and it did not work. My software still is Python 3.9 and I cannot apply the latest python version there.
Anaconda currently doesn't support versions higher than 3.9.
You can create your own environment using your IDE that utilize Python 3.11 and install all the required libraries via pip install from the command line interface.

How can I run Python 3.9.1 natively on M1 Mac?

Seems to be impossible currently with Anaconda as well as with Xcode 12. Via idle, it runs via Rosetta. There seems to be no discussion of this so either I'm quite naive or maybe this will be useful to others as well.
Python says: "As of 3.9.1, Python now fully supports building and running on macOS 11.0 (Big Sur) and on Apple Silicon Macs (based on the ARM64 architecture). A new universal build variant, universal2, is now available to natively support both ARM64 and Intel 64 in one set of executables" https://docs.python.org/3/whatsnew/3.9.html
Please help a newbie figure out how to take advantage of his recent impulse-buy.
You can now install python 3.9.1 through multiple pathways now but the most comprehensive build environment for the full data-science suite for python at the moment (Feb 2021) on M1 ARM architecture is via miniforge.
e.g.
brew install --cask miniforge
conda init zsh
conda activate
conda install numpy scipy scikit-learn
You can now install Python 3.9.4 natively on Mac M1 (Apple Silicon). I'm using pyenv to install Python 3.7, 3.8 and 3.9 all native ARM. For example, to install 3.9.4:
$ pyenv install 3.9.4
python-build: use openssl#1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.9.4.tar.xz...
-> https://www.python.org/ftp/python/3.9.4/Python-3.9.4.tar.xz
Installing Python-3.9.4...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.9.4 to /Users/squademy/.pyenv/versions/3.9.4
For a complete guide on install pyenv and multiple Python version, you might read this article: https://squademy.medium.com/install-python-on-macos-11-m1-apple-silicon-using-pyenv-12e0729427a9.
I am using python3.9.4. I installed it using homebrew only.
brew install python#3.9
Also you may want to do the following to unlink and check the version number
brew unlink python3
brew link python3.9
python3 --version
I upgraded to 3.9.4
Download the Python universal installer -
https://www.python.org/downloads/mac-osx/
Note: I still could not get sudo pip install mysqlclient to install.
I had add to
update homebrew - See https://brew.sh
Add /opt/homebrew/bin to PATH in .bash_profile (don't forget to source .bash_profile)
or
Add /opt/homebrew/bin to PATH in .zprofile (don't forget to source .zprofile) if using zsh

Rollback of conda environment results in CondaUpgradeError

CondaUpgradeError: This environment has previously been operated on by a conda version that's newer
than the conda currently being used. A newer version of conda is required.
target environment location: C:\Users\XXXXXXXXXX\AppData\Local\Continuum\anaconda3
current conda version: 4.5.11
minimum conda version: 4.6
Ok, let's try something stupid...
C:\Users\XXXXXXXX>pip install conda==4.6
Collecting conda==4.6
Could not find a version that satisfies the requirement conda==4.6 (from versions: 3.0.6, 3.5.0, 3.7.0, 3.17.0, 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.0.7, 4.0.8, 4.0.9, 4.1.2, 4.1.6, 4.2.6, 4.2.7, 4.3.13, 4.3.16)
No matching distribution found for conda==4.6
How do I get out of this trap? I've tried to upgrade it with various conda install and conda update commands but nothing works. This apparently happened upgrading from 4.6 to 4.6.2
Its a bug. recommendations are posted here on the conda issue board
basically, reinstall from cache or downgrade, then upgrade conda

how to uninstall geos in macosx

How do I uninstall geos in mac osx
When i do
sudo uninstall geos
I get this error
Uninstall Began...
Uninstall Failed...
Reason: ErrorMissingBundle
I have to uninstall it propely because I need to install a newer version . When I installed a newer version even the it shows
geos-config --version
3.1.1
It was present somewhere in my system. Installation for a new one was successful for some features of postgis is not working and and they are picking up 3.1.1 geos.
I will thankful if someone helps me out here.

Install packages for python 3.x using pip

My OS is Mac where the inbuilt python is 2.7 but I only want to use python 3.x.
Now I want to install some packages using pip for 3.x version, but the function pip is not defined in shell.
So how should I proceed?
Starting with 3.4.0, the PSF Mac OS X installer installs pip by default. If you do not have 3.4 already, I recommend that you install 3.4.2rc1 now or wait a few days or a week for the final 3.4.2 download. And do check the mac and tkinter info link on that page.

Resources