zsh

M1 trying to run SparkSession, but having RuntimeError: Java gateway process exited before sending its port number

M1 trying to run SparkSession, but having RuntimeError: Java gateway process exited before sending its port number Question: I am trying to run a simple command spark = SparkSession.builder.appName("Basics").getOrCreate() in my M1 Mac, Monterey 12.6.2, but it throws an error: The operation couldn’t be completed. Unable to locate a Java Runtime. Please visit http://www.java.com for …

Total answers: 1

How do I install a script to path on Mac OS on VScode

How do I install a script to path on Mac OS on VScode Question: Every time I install something using pip I get this warning message and the package I installed doesn’t work. I don’t understand what path is or how to fix it. I keep seeing solutions saying to simply change the files to …

Total answers: 3

zsh always show Python virtual env

zsh always show Python virtual env Question: I currently have this script to show my GitHub branch and virtual env: setopt PROMPT_SUBST autoload -Uz vcs_info precmd() { vcs_info } zstyle ‘:vcs_info:git:*’ formats ‘(%b)’ MYPS1=” MYPS1+=’%F{green}’ MYPS1+=’${${(%):-%n}:0:1}’ MYPS1+=’@’ MYPS1+=’${${(%):-%m}:(-4)}’ # Get last 4 chars of var machine name MYPS1+=’:’ MYPS1+=’%F{yellow}’ MYPS1+=’%1~’ # Show only the name …

Total answers: 1

How can I create a script to switch between my ARM conda and x86 conda?

How can I create a script to switch between my ARM conda and x86 conda? Question: I am on an apple silicon M1 MacBook Pro. I would like to have a native ARM python environment, and an environment that runs on x86 architecture with rosetta 2. I have installed two mini forge distributions, both in …

Total answers: 1

How to use pipenv on mac?

How to use pipenv on mac? Question: When install it by pip(pip install pipenv), on zsh shell can’t find the command pipenv. If install it by brew: brew install pipenv, then run pipenv shell, got error Loading .env environment variables… Launching subshell in virtual environment… Traceback (most recent call last): File "/usr/local/Cellar/pipenv/2020.11.15/libexec/bin/pipenv", line 8, in …

Total answers: 1

PATH="/custom/dir:$PATH" prepending instead of appending – Conda vs Pyenv

PATH="/custom/dir:$PATH" prepending instead of appending – Conda vs Pyenv Question: I have a Mac (latest software update) with Pyenv and Anaconda. I manage packages with Homebrew and have installed Python 3 with it. When I echo $PATH I get the following: /Library/Frameworks/Python.framework/Versions/3.8/bin: /usr/local/bin: /usr/bin: /bin: /usr/local/sbin: /usr/sbin: /sbin: /Library/TeX/texbin: /Users/luca/.pyenv/versions/anaconda3-2020.02/condabin: /Users/luca/.pyenv/versions/3.8.5/bin: /Users/luca/.pyenv/bin I do not …

Total answers: 2

Get pytest autocompletion in zshell

Get pytest autocompletion in zshell Question: This question may be better suited for superuser — if that’s the case let me know and I’ll shift it. I use zsh and frequently run pytest from the command line. A very common situation is that I need to run a specific test (or a subtest of a …

Total answers: 2

Anaconda not found in ZSh?

Anaconda not found in ZSh? Question: I installed Anaconda via command line. The bash file. If Im in bash, I can open and use anaconda, like notebooks, ipython, etc. If I change my shell to ZSH, all the anaconda commands appear like "not found". How I can make it work in zsh? I use a …

Total answers: 13

Conda command not found

Conda command not found Question: I’ve installed Miniconda and have added the environment variable export PATH="/home/username/miniconda3/bin:$PATH" to my .bashrc and .bash_profile but still can’t run any conda commands in my terminal. Am I missing another step in my setup? I’m using zsh by the way. Asked By: olivrg || Source Answers: If you’re using zsh …

Total answers: 25