Live coding 1

The left mouse/trackpad button.

2 Likes

THANK YOU for the let me know what is clicking.

A quick query:
Does wget command download as well as install an application or just downloads it? I did wget <some-link> and was wondering what it it did?
If it just downloaded it, how do I install?

wget will simply download any file from the specified URL. To install it you’d have to run the downloaded file but that part would vary depending on your OS and the type of file you downloaded.

For example, if you downloaded a script file, you would need to run it via the appropriate script handler. If you are on Linux/macOS and downloaded a file with a .sh extension, it probably is a bash script file which would need to be run via bash by running the script from the terminal by specifying bash <scriptname>.sh or by updating the executable status of the script.

But there may be other ways to do things depending on the type of file you downloaded :slightly_smiling_face:

4 Likes

Thanks, this helped. I was trying to install a .deb file (Quarto’s). I did the following:

Step 1: wget <url>

  • This downloaded the .deb file.

Step 2: sudo dpkg -i <downloaded .deb file>

  • This installed that .deb file.
3 Likes

Hello, just installed wsl and ubuntu.
Is it ok to do this stuff in root ? (root@Razvan00:~#)
Also when i click Settings on Terminal it opens a notepad by Default.Dose anyone know how to change that?
btw what program do i need to open Settings the right way.

Depends what you mean by “ok”.
It should work fine, but its important to consider the Principle of Least Priviledge.

Could you clarify how you open Settings?
I don’t get notebook when I do the following…
image

I see
Will watch some tutorials on how to do that.
For ppl that have the same problem *this 6 min yt clip hepled * Linux Command Line Tutorial For Beginners 22 - useradd command (Creating Users) - YouTube

I clicked the arrow (thats marked with a red square on your screenshot) and the options appeared and after i clicked settings a notepad file opened.
I wanted to make a screenshot but the problem is gone.A windows update might have solved it :slight_smile:

Thanks for your answears! :grin:

1 Like

I wrote a blog from the video if anyone wants to read. I added something and skipped something from the video, so it is not exactly the same.

4 Likes

This looks good! I also wrote a post that’s slightly different. I referenced your post as well (hope that’s okay!).

2 Likes

Thank you! I don’t mind referencing my post at all, I’m actually thankful for it.

I like your post as well. Keep up the good work.

1 Like

Hello everyone;
I have been following the video 1 (Live coding 1), and following all the steps, once the installation of Mamba is finished, I close and reopen my mac terminal and the computer does not seem to find the virtual environment. I don’t know exactly what I must be doing wrong. What I did remove versions of Python, Miniconda3 and Ipython from the system.
Any ideas please help me.
Regards

Hi @sdCarr,

I would think that is because mamba didn’t initialise, e.g. the PATH variable needs to be updated in order for the shell to find the executables. You can try doing echo $PATH, there should be something like: "~/mambaforge/bin"

If this is missing, you could try to run: mamba init which should update the .bashrc file and make sure that always when you open a terminal the PATH variable is updated.

the mambaforge folder is in the root directory, but when I run the command ‘echo $PATH’ there is no sign of the installation in the PATH directory. Attached is a screenshot:



I just wanted to give more data to see if someone can help me. The environment variables on my machine are:
sdcarr@MacBook-Pro-de-Silvino opt % env

TMPDIR=/var/folders/nb/sc6_k5jn76s2_byxg4c79pt00000gn/T/

__CFBundleIdentifier=com.apple.Terminal

XPC_FLAGS=0x0

TERM=xterm-256color

SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.IVPpTOuthb/Listeners

XPC_SERVICE_NAME=0

TERM_PROGRAM=Apple_Terminal

TERM_PROGRAM_VERSION=444

TERM_SESSION_ID=ED36DC07-B006-41C1-A38C-61199A53BED1

SHELL=/bin/zsh

HOME=/Users/sdcarr

LOGNAME=sdcarr

USER=sdcarr

PATH=/Users/sdcarr/opt/miniconda3/bin:/usr/local/Cellar/macvim/8.0-133/MacVim.app/Contents/bin:/usr/local/Cellar/macvim/8.0-133/MacVim.app/Contents/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/local/bin:/opt/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Applications/Little Snitch.app/Contents/Components:~/.dotnet/tools:/Library/Apple/usr/bin:/Users/sdcarr/.cargo/bin

SHLVL=1

PWD=/Users/sdcarr/opt

OLDPWD=/Users/sdcarr/opt

HOMEBREW_PREFIX=/opt/homebrew

HOMEBREW_CELLAR=/opt/homebrew/Cellar

HOMEBREW_REPOSITORY=/opt/homebrew

MANPATH=/opt/homebrew/share/man:/opt/local/share/man:/opt/homebrew/share/man:::

INFOPATH=/opt/homebrew/share/info:/opt/homebrew/share/info:

LANG=es_ES.UTF-8

_=/usr/bin/env

Are you using zsh as shell? In that case there should be something like this in your ~/.zshrc file, so that mamba is added to your path:

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/lucasvanwalstijn/mambaforge/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/lucasvanwalstijn/mambaforge/etc/profile.d/conda.sh" ]; then
        . "/Users/lucasvanwalstijn/mambaforge/etc/profile.d/conda.sh"
    else
        export PATH="/Users/lucasvanwalstijn/mambaforge/bin:$PATH"
    fi
fi
unset __conda_setup

if [ -f "/Users/lucasvanwalstijn/mambaforge/etc/profile.d/mamba.sh" ]; then
    . "/Users/lucasvanwalstijn/mambaforge/etc/profile.d/mamba.sh"
fi
# <<< conda initialize <<<

This should be added by your mamba init, see also here:

From which it seems that you might have to do

/(your conda installation path)/bin/mamba init zsh
1 Like

I had the path route wrong. I changed “/Usuarios/sdcarr/opt/miniconda3/bin” to this one “/Users/sdcarr/mambaforge/bin/conda” and everything started to work fine.
I guess I did not clean the previous miniconda3 installation correctly.
Thank you very much !

1 Like

I recently re-visited this session because I switched from Windows to Apple. I summarized my experiences in this blog post: Installing Fast.AI on Apple Silicon

1 Like

I am stuck in a loop - How to stop Fastai downgrading Pytorch (to use CPU) on my local machine(ubuntu)?

Please help. Thankyou

I just wanted to add a gigantic thank you. I got into programming later in life, have been learning it all on my own, and made an utter mess of the Python environment on my old Mac - to the point where, as other students mentioned, the environmental issues were completely in the way of learning actual concepts.

I’m starting over on a brand-new Mac today (Apple M3 Pro, 14.4.1 (23E224)), followed the video and my install went perfectly, with a few adjustments due to the Sept 23 note discouraging use of Mambaforge

Here’s what I did:

Extra steps that were necessary due to the fresh OS.

  • I made a second user on the Mac anyway so I’d feel really free to try anything.
  • Installed Xcode command line tools
  • Installed homebrew for wget
  • Set up git and an ssh key and confirmed connection to github

Then started on Python, following the video

  • Checked the only python was system python at /usr/bin/python
  • Default shell was zsh. I didn’t change it.
  • Opened the shell to edit with nano ~/.zshrc
  • I was a bit confused (and worried) when I went to GitHub - conda-forge/miniforge: A conda-forge distribution. and read “After the release of Miniforge 23.3.1 in August 2023, Miniforge and Mambaforge are essentially identical…That said, if you had to start using one today, we recommend to stick to Miniforge.”
  • Since the live coding video is 2022 and it’s 2024, I decided to go with the Miniforge installer. I’m guessing others have the same question about whether to use Mambaforge or Miniforge, but I couldn’t find an answer.
  • Figured with a fresh OS install there was not much to lose :upside_down_face:
  • In zsh terminal the installer ran with bash Miniforge3-MacOSX-arm64.sh . Is it ok to do this from inside the zsh shell? It updated my .zshrc profile and my shell opens up in (base) environment showing the path /Users/aimluser/miniforge3/bin/python for which python. Looks good!
  • Then I was afraid things would break upon running mamba install blah blah blah commands because I’d used Miniforge, but it’s fine. I think, if I understand correctly, this is because Miniforge contains the Mamba installer.
  • I installed ipython, pytorch, and jupyterlab with mamba install. No errors whatsoever!

I seriously learned more in an hour about smart ways to work intentionally and systematically than I have in years of teaching myself. So grateful!

2 Likes