###### tags: `環境資料樹` `資料樹` ## zsh ``` shell> brew install zsh shell> brew install antigen shell> brew cask install font-dejavusansmono-nerd-font shell> echo /usr/local/bin/zsh | sudo tee -a /etc/shells shell> chsh -s /usr/local/bin/zsh ``` `.zshrc` ```sh source /usr/local/share/antigen/antigen.zsh source ~/.iterm2_shell_integration.zsh POWERLEVEL9K_MODE='nerdfont-complete' # POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon dir vcs pyenv) POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon dir vcs virtualenv) POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(public_ip ip) # Load the theme. antigen theme bhilburn/powerlevel9k powerlevel9k # Load the oh-my-zsh's library. antigen use oh-my-zsh antigen bundle iterm2 antigen bundle virtualenv antigen bundle copyfile antigen bundle copydir antigen bundle pip antigen bundle git antigen bundle colored-man-pages antigen bundle extract antigen bundle zsh-users/zsh-completions antigen bundle zsh-users/zsh-autosuggestions # Syntax highlighting bundle. antigen bundle zsh-users/zsh-syntax-highlighting antigen apply ``` --- pipenv === ##### Installing Pipenv ```jason Linux shell> curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py shell> python get-pip.py --user shell> sudo apt-get install python3-distutils shell> python3 get-pip.py --user shell> pip install --user pipenv shell> pip install --user --upgrade pipenv ``` ```shell shell> brew install pipenv shell> brew upgrade pipenv ``` ```shell shell> curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py shell> python get-pip.py --user shell> pip install --user pipenv shell> pip install --user --upgrade pipenv ``` ```shell export PATH="~/.local/bin:$PATH" export PIPENV_VENV_IN_PROJECT=1 ``` ```shell shell> pipenv --three shell> pipenv --two ``` ```shell shell> cd myproject shell> pipenv --python 3.6 shell> pipenv --python 3.7 shell> pipenv install requests shell> pipenv run python main.py shell> pipenv lock -r > requirements.txt ``` ```shell shell> pipenv shell shell> pipenv --where shell> pipenv --venv shell> pipenv --py shell> pipenv graph shell> pipenv uninstall --all shell> pipenv check ``` ```shell shell> cd $(pipenv --venv) ``` ```shell shell> pipenv --rm ``` ```shell shell> export PIPENV_VENV_IN_PROJECT=1 ``` `Pipfile` `requirements.txt` ```shell shell> pipenv install yapf --dev shell> pipenv install flake8 --dev shell> pipenv install opencv-python ``` ```shell shell> pipenv install jupyter shell> pipenv install jupyter_contrib_nbextensions shell> pipenv install jupyter_nbextensions_configurator shell> pipenv install yapf shell> pipenv install isort shell> jupyter notebook ``` **📚 參考網站:** - https://github.com/pypa/pipenv - https://pipenv.readthedocs.io/en/latest/basics/ - https://docs.pipenv.org/ - https://docs.pipenv.org/install/ direnv === ```shell shell> brew install direnv ``` ```sh eval "$(direnv hook zsh)" ``` ```shell shell> echo layout_pipenv >> .envrc ``` `.envrc` ```sh layout_pipenv ``` ``` shell> direnv allow . shell> direnv help ``` `~/.config/direnv/allow` **📚 參考網站:** - https://github.com/direnv/direnv - https://direnv.net/ Linux版.zshrc === ``` python source /usr/local/share/antigen/antigen.zsh POWERLEVEL9K_MODE='nerdfont-complete' # POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon dir vcs pyenv) POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon dir vcs virtualenv) POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(public_ip ip) # Load the theme. antigen theme bhilburn/powerlevel9k powerlevel9k # Load the oh-my-zsh's library. antigen use oh-my-zsh antigen bundle iterm2 antigen bundle virtualenv antigen bundle copyfile antigen bundle copydir antigen bundle pip antigen bundle git antigen bundle colored-man-pages antigen bundle extract antigen bundle zsh-users/zsh-completions antigen bundle zsh-users/zsh-autosuggestions # Syntax highlighting bundle. antigen bundle zsh-users/zsh-syntax-highlighting antigen apply export PIPENV_VENV_IN_PROJECT=1 eval "$(direnv hook zsh)" export PATH="/usr/local/cuda-10.1/bin:$PATH" export LD_LIBRARY_PATH="/usr/local/cuda-10.1/lib64:$LD_LIBRARY_PATH" ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up