4
我遇到了虛擬環境和mod_wsgi配置的問題。虛擬環境錯誤python版本
我有這個在我的Apache配置:
WSGIDaemonProcess myapp python-path=/mnt/myapp/current:/mnt/env/lib/python3.4/site-packages
其中明確規定,我使用python3.4。
但是,如果我在我的虛擬環境中,如果我這樣做,我得到的信息是Python版本3.4.3是:
(env)[email protected]:/mnt/env/bin# python
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
但是如果我列出bin
文件夾中的所有文件,我可以看到即python3.4
已安裝。
lrwxrwxrwx 1 root root 9 Mar 24 10:50 python -> python3.4
lrwxrwxrwx 1 root root 9 Mar 24 10:50 python3 -> python3.4
-rwxr-xr-x 1 root root 3709944 Mar 24 10:50 python3.4
在我的Apache日誌我得到這樣的警告:
[Fri Jul 08 10:32:52.394080 2016] [:warn] [pid 29613] mod_wsgi: Compiled for Python/3.4.0.
[Fri Jul 08 10:32:52.394119 2016] [:warn] [pid 29613] mod_wsgi: Runtime using Python/3.4.3.
,這也是從我的Apache日誌:
Fri Jul 08 10:53:01.266961 2016] [:error] [pid 29619] Traceback (most recent call last):
[Fri Jul 08 10:53:01.267014 2016] [:error] [pid 29619] File "/usr/lib/python3.4/threading.py", line 1288, in _shutdown
[Fri Jul 08 10:53:01.268311 2016] [:error] [pid 29619] assert tlock is not None
[Fri Jul 08 10:53:01.268356 2016] [:error] [pid 29619] AssertionError:
[Fri Jul 08 10:53:01.259885 2016] [:error] [pid 29621] Exception ignored in: <module 'threading' from '/usr/lib/python3.4/threading.py'>
我不知道,如果在最後的消息日誌連接到以前,但我認爲它是。
有人可以建議我如何在我的虛擬環境中安裝Python版本3.4.3
?之後,我會改變mod_wsgi
配置。
謝謝!