virtualenvwrapper.sh: There was a problem running the initialization hooks. If Python could not import the module virtualenvwrapper.hook_loader, check
Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/local/lib/python2.6/dist-packages/virtualenvwrapper/hook_loader.py", line 81, in main backupCount=1, File "/usr/lib/python2.6/logging/handlers.py", line 112, in __init__ BaseRotatingHandler.__init__(self, filename, mode, encoding, delay) File "/usr/lib/python2.6/logging/handlers.py", line 64, in __init__ logging.FileHandler.__init__(self, filename, mode, encoding, delay) File "/usr/lib/python2.6/logging/__init__.py", line 827, in __init__ StreamHandler.__init__(self, self._open()) File "/usr/local/lib/python2.6/dist-packages/virtualenvwrapper/hook_loader.py", line 23, in _open rtv = logging.handlers.RotatingFileHandler._open(self) File "/usr/lib/python2.6/logging/__init__.py", line 846, in _open stream = open(self.baseFilename, self.mode) IOError: [Errno 2] No such file or directory: '/home/phenix/envs/war/war/app_base/$VIRTUALENVWRAPPER_LOG_DIR/hook.log' 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/local/bin/python and that PATH is set properly.
今天上班打开终端,workor war后,每当我新打开一个终端窗口就会报上面的信息。原因是木有设置log地址。
$ vim /home/phenix/.bashrc
我的是这样:
source /usr/local/bin/virtualenvwrapper.sh 2> /dev/null VIRTUALENVWRAPPER_LOG_DIR=/tmp export VIRTUALENVWRAPPER_LOG_DIR
然后就木有问题鸟~
(╯-_-)╯╧╧