gpt4 book ai didi

virtualenvwrapper 命令不起作用

转载 作者:行者123 更新时间:2023-12-03 05:28:00 29 4
gpt4 key购买 nike

tow-81-235:Projects pessimisticoptimism$ mkvirtualenv development
-bash: mkvirtualenv: command not found
tow-81-235:Projects pessimisticoptimism$ sudo pip install virtualenvwrapper
Password:
Requirement already satisfied (use --upgrade to upgrade): virtualenvwrapper in /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /Library/Python/2.7/site-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): virtualenv-clone in /Library/Python/2.7/site-packages (from virtualenvwrapper)
Cleaning up...
tow-81-235:Projects pessimisticoptimism$ mkvirtualenv development
-bash: mkvirtualenv: command not found

为什么我会收到此错误?我安装了 virtualenvvirtualenvwrapper。我想使用 mkvirtualenvworkon。我觉得很奇怪,virtualenv 正在工作,但 virtualenvwrapper 却没有。

最佳答案

第一,确保您使用 sudo 进行安装:

sudo pip install virtualenvwrapper

第二,将以下行附加到您的 .bashrc 文件(使用 nano ~/.bashrc):

export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh

第三,重新加载您的个人资料

source ~/.bashrc

关于virtualenvwrapper 命令不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12232421/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com