sách gpt4 ai đã đi

Terminal: Các tập tin khởi động shell nằm ở đâu?

In lại 作者:行者123 更新时间:2023-12-03 08:56:31 28 4
mua khóa gpt4 Nike

我正在学习一个名为 Starting a Django 1.4 Project the Right Way 的教程,其中提供了有关如何使用 virtualenv 和 virtualenvwrapper 等的说明。

有一段是这样写的:

If you're using pip to install packages (and I can't see why you wouldn't), you can get both virtualenv and virtualenvwrapper by simply installing the latter.

   $ pip install virtualenvwrapper

After it's installed, add the following lines to your shell's start-up file (.zshrc, .bashrc, .profile, etc).

   export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/directory-you-do-development-in
source /usr/local/bin/virtualenvwrapper.sh

Reload your start up file (e.g. source .zshrc) and you're ready to go.



我正在运行 Mac OSX,并且不太了解终端的方式。作者 shell's start-up file (.zshrc, .bashrc, .profile, etc)究竟是什么意思? ?我在哪里可以找到这个文件,以便我可以添加这三行?

还有,他说的 reload your start up file (e.g. source .zshrc)是什么意思? ?

我将不胜感激,具体针对 OSX 的详细回复。

1 Câu trả lời

您可能正在使用 đập mạnh所以只需将这 3 行添加到 ~/.bash_profile :

$ cat >> ~/.bash_profile
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/directory-you-do-development-in
source /usr/local/bin/virtualenvwrapper.sh
^D

哪里 ^D表示您键入 Control+D (EOF)。

然后关闭您的终端窗口并打开一个新窗口,或者您可以“重新加载”您的 .bash_profileGiống như thế này:
$ source ~/.bash_profile

关于macos - 终端:shell启动文件在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15101559/

28 4 0
行者123
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com