0

I am having difficulty using the MacBook Air and getting it to allow me to access the bashrc so I can add file paths such as the one for Miniconda3 that I just installed.

I installed Miniconda using the commands below:

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

and then

bash Miniconda3-latest-Linux-x86_64.sh

however, I still need to add it to the file paths in bashrc.

When I first tried to pull up bashrc it pulled up a new empty file (the code I used it below):

nano ~/.bashrc

I tried

Command + Shift + Period ( the keys )

when that didn't work I tried

ls -lha

I tried to find the file but it still seems to be hidden.

Then I tried

defaults write com.apple.Finder AppleShowAllFiles true
killall Finder

but that did not work either in helping to open the bashrc. I am not sure how to access the bashrc file.

Used the URL: https://www.easeus.com/computer-instruction/bash-profile-on-mac.html#:~:text=Type%20open%20%2Da%20TextEdit.,edit%20it%20on%20your%20Mac.

The code I did:

cd ~/
touch .bash_profile

then I opened TextEdit. Pressed command+O as mentioned on the site but that didn't seem to move it to a home directory. Then opened it in the text editor using:

open -a TextEdit.app ~/.bash_profile

then I pasted:

export PATH=$HOME/miniconda3/bin:$PATH

but when I typed the following command it could not find. python:

which python

Then I tried the command below to change the terminal to bash:

chsh -s /bin/bash
which python

however, it still cannot find python. What am I doing wrong?

Can someone help me to find a way to access the bashrc file so I can add a file path for a software I installed - in this case - Miniconda3 I am on an M2 Air and it does not seem to allow me to install packages directly from the site (it says its not compatible for some reason)?

8
  • Welcome to Ask Different. You are running macOS, not Linux, so you need to follow the macOS install instructions for Miniconda. Commented Jan 16, 2023 at 22:28
  • I tried but it seems to say the the M1 Miniconda is not compatible with my machine @AndyGriffiths
    – Indira
    Commented Jan 16, 2023 at 22:31
  • repo.anaconda.com/miniconda/… Commented Jan 16, 2023 at 22:33
  • Please edit your question to include the output of the error when you try to install the Arm Miniconda pkg. 'Seems to say...' is too vague. Commented Jan 16, 2023 at 22:34
  • Also, the standard shell for macOS on M1 machines is zsh. Also please add your OS version to the question. Commented Jan 16, 2023 at 22:39

1 Answer 1

2

The 'easy' way to install Miniconda is to use the pkg installer from https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.pkg The installation instructions you are most likely following have not been updated since mid-2021.

You do not need to use bash or edit / create any config files. Just close and open your terminal window in order to pick up any config changes the installer performs.

The M1 bash install is just a shell script to install Miniconda. It is for users who are using the bash shell in the terminal. By default macOS uses the zsh now.

Don't forget to reverse any changes you have made in the attempt to get the wrong version working.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .