gpt4 book ai didi

python - virtualenvwrapper 的错误消息

转载 作者:行者123 更新时间:2023-12-01 05:03:17 27 4
gpt4 key购买 nike

当我在终端上开始新 session 时遇到问题:

Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named virtualenvwrapper.hook_loader
virtualenvwrapper.sh: There was a problem running the initialization hooks.

If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenv has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is
set properly.

所以我按照 Error message for virtualenvwrapper on OS X Lion 上的说明进行操作。

现在错误是:

-bash: /usr/local/share/python/virtualenvwrapper.sh: No such file or directory

不知道如何解决这个问题..

需要一些指导..

编辑:

 Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH

export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python

最佳答案

尝试将这些行添加到您的 shell 启动文件(.bashrc.profile..):

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

之后,根据您的启动文件输入 source .bashrcsource .profile ,应该没问题。

关于python - virtualenvwrapper 的错误消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25590251/

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