Hot answers tagged

4

You can accomplish this by adding export PATH="/path/to/python:"$PATH to your ~/.zshrc (or ~/.bash_profile if you're not on Catalina). I'd like to propose an alternative and suggest pyenv, available via Homebrew. You can set a specific Python version to be "global" (i.e. default everywhere) and/or "local" (i.e. using that version in a specific directory ...


3

I installed Python 3.8 for macOS using the installer from python.org, not homebrew which is also installed on my Mac but rarely used. I think the first three lines below to my ~/.bash_profile was automatically added by the installer from python.org. With those, any changes I make using pip3 seem to affect only the 3.8 whereas those made via pip seem to ...


2

The solution is to source the file dependencies you need inside the automator script. Example if you added all of your scripts to ~/.zshrc source ~/.zshrc deploy You can debug things easier by doing which deploy to check to see if that script is accessible.


2

When you're talking about "recursively" then find comes into play. cd /path/to/parent_folder find . -depth -exec do_stuff_here + I'm using -depth so that files in a subdirectory get renamed before the subdirectory itself, and -exec program {} + so that the program receives many filenames at once, reducing startup overhead. Since there's no builtin rename ...


2

Bash is included in macOS 10.15 Catalina still however it is not the default login shell for new accounts. This was done as Apple has increasingly been removing dependencies from the core OS for security reasons. In this particular case since version 4 bash switched from the GPLv2 to the GPLv3 license which is not compatible with how Apple distribution ...


2

The only package manager that’s somewhat default is /usr/bin/easy_install for python. You have to choose and install any of the leading open source type package managers. For brew, this has been the command to download and run code from the internet. /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" If ...


1

pgAdmin 4 (/Applications/PostgreSQL 12/pgAdmin 4.app) is a simple launcher for /Library/PostgreSQL/12/pgAdmin 4.app which itself is some kind of a service wrapper. Besides launching a small web server, it also starts the menulet "pgAdmin 4" (the black elephant) and probably does some other things too. The recommended way to restart pgAdmin 4 is to quit the ...


1

This is due to use of the special variable PATH (in while read PATH). PATH is used by they system as a list of directories to find command executables; if it doesn't point to the usual binaries directories, the OS won't be able to find commands any more. Solution: use a different (preferably lower- or mixed-case) name for the variable. There are quite a ...


1

You can't fiddle with /usr/bin: it's (SIP) restricted. To validate this understanding, just execute ls -laO /usr/bin So "resetting" this path as you seek to do is a non-starter. /usr/bin is full of binaries compiled by Apple themselves. For instance, if you execute /usr/bin/git --version you'll see the git that lives here is an Apple thingy; nothing ...


1

macOS Catalina (10.15) now uses Zsh, which makes this really easy. Show the currently running / last run command by disabling auto_title and adding a preexec hook: # File: ~/.zshrc DISABLE_AUTO_TITLE="true" preexec() { printf "\e]1;${1}\a" }


Only top voted, non community-wiki answers of a minimum length are eligible