V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
Hamao
V2EX  ›  Python

关于 Mac 使用 conda 遇到的问题,请教一下

  •  
  •   Hamao · 13 天前 · 230 次点击
    前因:要求我用 anaconda 开发

    操作:
    选择环境--
    /opt/anaconda3/bin/activate && conda activate /opt/anaconda3/envs/text2sql


    遇到的问题:
    conda list 存在的包,在命令行里使用就找不到了
    unicorn main:app --reload
    zsh: command not found: unicorn

    这个问题很基础但是真的折腾我一上午了,查了好多方法都没有效果,还是没有找到问题所在
    只好上来求助请各位帮忙看一下

    下面是我的 .zshrc 配置:

    export PATH="/usr/local/bin:$PATH"
    export PATH="/usr/local/sbin:$PATH"
    export PATH="/usr/bin:$PATH"
    export PATH="/usr/sbin:$PATH"
    export PATH="/bin:$PATH"
    export PATH="/sbin:$PATH"
    export PATH=${PATH}:/usr/local/mysql/bin/
    export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/bottles
    alias python=/usr/bin/python3
    ___MY_VMOPTIONS_SHELL_FILE="${HOME}/.jetbrains.vmoptions.sh"; if [ -f "${___MY_VMOPTIONS_SHELL_FILE}" ]; then . "${___MY_VMOPTIONS_SHELL_FILE}"; fi
    eval "$(starship init zsh)"
    eval "$(pyenv init -)"

    source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh

    #Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
    export PATH="$PATH:$HOME/.rvm/bin"
    source ~/.bash_profile
    source /etc/profile

    # >>> conda initialize >>>
    # !! Contents within this block are managed by 'conda init' !!
    __conda_setup="$('/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
    if [ $? -eq 0 ]; then
    eval "$__conda_setup"
    else
    if [ -f "/opt/anaconda3/etc/profile.d/conda.sh" ]; then
    . "/opt/anaconda3/etc/profile.d/conda.sh"
    else
    export PATH="/opt/anaconda3/bin:$PATH"
    fi
    fi
    unset __conda_setup
    # <<< conda initialize <<<
    4 条回复
    supergeek1
        1
    supergeek1  
       13 天前
    应该是 uvicorn 吧
    supergeek1
        2
    supergeek1  
       13 天前
    @supergeek1 不行还可以在命令前加 python -m
    Hamao
        3
    Hamao  
    OP
       13 天前
    @supergeek1 收到 感谢 删帖 丢人
    Hamao
        4
    Hamao  
    OP
       13 天前
    我靠 今天上午真的是 老眼昏花 被这种低级问题给 gap 了,丢人了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1025 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 19:08 · PVG 03:08 · LAX 12:08 · JFK 15:08
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.