conda command not found on pi3 - raspberry-pi3

I've installed miniconda3 on my raspberry pi 3. I've added the path to the .bashrc which is export PATH="/home/pi/miniconda3/bin:$PATH" at the end of the file. I did not jump many lines, I only started a new one.
But when I write conda in terminal I get the error command not found. Where could I have gone wrong? Was I suppose to add the path in a specific place in the .bashrc ?
Installed version from: http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-armv7l.sh by recommendation of this answer: How to install Anaconda on RaspBerry Pi 3 Model B

When you install Miniconda, by default it will choose "/root/miniconda3" unless you change. Follow the install process again, but when asked about the location, input this "/home/pi/miniconda3/". Copy and paste the path between quotes. After miniconda install, add this: export PATH="/home/pi/miniconda3/bin:$PATH" to .bashrc. After "sudo reboot" you will be able to use conda commands. :)

Related

Raspberry Pi 3 Miniconda install aarch64 error

I am entering
sudo bin/bash Miniconda3-latest-Linux-aarch64.sh
I enter the correct directory, but when it comes to "Unpacking the payload ..."
it gives me an error
"Miniconda3-latest-Linux-aarch64.sh: line 417: 2300 Illegal instruction "$CONDA_EXEC" constructor --prefix "$PREFIX" --extract-conda-pkgs"
Follow these steps to install a smooth Conda Package Manager on your Raspberry Pi 3 or 4.
Forget about the Miniconda---------aarch64.sh route because it is really challenging to fix it and make it work after installation. Mambaforge is the key and has worked very smoothly for me.
Make sure your Raspbian OS is 64 bit.
Get the latest version of aarch64.sh from https://github.com/conda-forge/miniforge/releases. When I did the install the latest was Mambaforge-22.9.0-2-Linux-aarch64.sh
Install it and make sure the path is added to your .bashrc file.
Reboot your Raspberrypi or spin up your .bashrc file to activate conda.
Test your conda installation.
Now, let's do it.
Go to your downloads directory and download what you need.
cd /home/username/Downloads
sudo wget https://github.com/conda-forge/miniforge/releases/download/22.9.0-2/Mambaforge-22.9.0-2-Linux-aarch64.sh
Start the installation
sudo /bin/bash Mambaforge-22.9.0-2-Linux-aarch64.sh
Now during the installation put the installation path as given below. You can name it something else, but to save your time you can just follow me.
/home/username/miniconda3
Open your .bashrc file sitting at the location /home/username/.bashrc and the the following line in the end of it. And you can skip this step if your installation process already edited your .bashrc file with something similar.
export PATH="/home/username/miniconda3/bin:$PATH"
Considering that your .bashrc is edited, so it need to be reloaded.
source ~/.bashrc
Now, let's test your conda installation
conda init
conda env list
Happy? Are we? Now? Cheers!!!

Local development on Mac M1 | Laravel & VueJs

I've just switched to MacOs - never used it before and I'm using Macbook M1 Pro, so a newbie here. Also, I've only started with web dev so I'm fairly new in this field as well.
Now, how should I proceed in order to set-up a local development enviroment - I plan to use mainly Laravel & VueJs?
Things I've done so far:
Installed VS code
Installe MAMP
Cloned my Git repository with project I was working on (Windows 10)
This is the part where I need help - I think I'm supposed to install Homebrew, but even if I follow the instructions on their website I can't get it working properly. It's installed but as soon as I close & reopen the terminal, it throws zsh: command not found: brew. The commands I'm used to - php artisan xyz or npm run watch don't work
Do you guys have some guide or step-by-step tutorial of what should I do in order to get my Laravel&Vue git project up & running on a localhost?
brew is installed in /usr/local/Homebrew/bin/brew (symlinked to /usr/local/bin/brew). Make sure /usr/local/bin is in your PATH, so that brew and newly installed Homebrew packages are available on the command line. This is typically setup by the ~/.zshrc file.
Troubleshooting steps:
Edit $HOME/.zshrc.
If export PATH is not found, add the following line. The important part is to ensure /usr/local/bin is present (and that :$PATH is last) to give it higher precedence. If the export PATH line exists, but commented, uncomment it.
export PATH=$HOME/bin:/usr/local/bin:$PATH
Restart your shell. .zshrc is loaded automatically at shell startup.
Check for brew with the which command:
$ which brew
/usr/local/bin/brew
Update
This suggestion here fixed my issues: https://stackoverflow.com/a/66521797/9682588
So, what I did was:
echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.bash_profile && source ~/.bash_profile

need to manually create symlinks every time i install something

For example, I'm trying to install pipenv using the following commands:
$ pip3 install --user pipenv
$ cd ~/Documents/myproject
$ pipenv install requests
zsh: command not found: pipenv
It seems that the issue can be resolved if I run sudo ln -s ~/.local/bin/pipenv /usr/bin. Is this a safe thing to do? I've also been having this issue with several other packages, like tensorboard and xflux. Is there something wrong with my system that makes it such that I need to manually create a symlink every time? How can I change things so that packages can install normally without me having to do this every time?
The problem you are having is that the tools you are installing are being installed in non-standard locations and are not being included in your PATH. One way to resolve this would be to include the paths in your PATH environment variable. In order for these programs to be in your path every time you login, do this (assuming you are using zsh as your shell):
1) Open ~/.zshrc using vim or any other editor:
vim ~/.zshrc
2) Append the following to this file:
export PATH=$PATH:/path/to/dir/containing/pipenv
Remember to replace /path/to/dir/containing/pipenv with the appropriate path.
3) Source your ~/.zshrc so that the path is included in your current session:
source ~/.zshrc
4) Now everytime you login, the paths should be available in your environment and you won't need to create symlinks.

Can't access conda after changing name of mac user account

When I first got my Macbook Pro, I set it up where my home folder was named
/Users/monicaheddneck/
I installed all the software I needed, like python, etc, and went about my business.
Last night, I decided to change the name of my folder to simply
/Users/monica/
and did it this way.
Fine.
Today, I decided to run jupyter notebook for the millionth time, and realized I may have borked all paths for all the libraries I have...and who knows what else.
For example,
conda --version
tells me I don't even have conda installed:
-bash: conda: command not found
My question: is there any way to fix the broken path to conda?
I am using Mac High Sierra, version 10.13.3
When using the conda installer, it asks if you want to add and export line with the path to conda in your bashrc file. My guess is that it wasn't updated when you changed the name of your account.
Have a look at your bashrc (hidden file) which should be in your home and update it as necessary ! The line should look like this:
export PATH="/Users/monicaheddneck/xxxconda/bin:$PATH"
and should be fixed appropriatly:
export PATH="/Users/monica/xxxconda/bin:$PATH"
You will then have to source your new bashrc file or restart a terminal.

Error no module named tensorflow in Anaconda for mac

I installed tensorflow as described for Anaconda installation in the tensorflow.org. I could run the tensorflow in the Mac terminal just typing,
$ source activate tensorflow
$ python
import tensorflow as tf
But, when I run iPython notebook, it does not work by showing an error of no module named tensorflow. I felt like tensorflow was correctly installed but iPython notebook could not recognize it. Is there any way to fix it?
Please have a look at your path. When you do the command 'source activate tensorflow', your path may have changed. The example is following.
sherrie#sherrie-PC:~/tensorflow/tensorflow/examples/udacity$ source activate tensorflow
discarding /home/sherrie/anaconda2/bin from PATH
prepending /home/sherrie/anaconda2/envs/tensorflow/bin to PATH
Tensorflow is installed in the first path, instead of the second one.
The most important step comes. Open your directory of 'anaconda' --> find the 'envs' --> open 'tensorflow' --> copy all files in 'sitepack0ages' to 'anaconda/lib/python2.7/sitepack-ages'. Done.
My answer is based on this other answer: Trouble with TensorFlow in Jupyter Notebook. I had the exact same problem, and I solved it by doing this:
Once your environment is activated, run "which jupyter" and verify if the path returned points to the /bin folder under your environment, something like /my_environments_path/my_tensorflow_environment_name/bin/jupyter. If this is already the case, your scenario is different from the one I had;
Run "which pip" and/or "which pip3". Odds are, you are executing pip or pip3 from a different location, so Jupyter is not being installed inside your environment. In my case, Python version was 3.6, but pip3 was being called from a different location. I ran "pip install jupyter", since pip was inside the /bin folder in my environment. Once I called the correct pip, I checked again the "which jupyter" command, and this time Jupyter was under my environment and I could import Tensorflow inside my notebooks. If no pip's path points to your environment, install pip inside it by running "conda install pip".
I hope this works, along with the additional information on the link above.

Resources