【发布时间】:2014-07-27 09:39:16
【问题描述】:
我在 CentOS 中创建了一个名为 nafd_it 的新用户。
然后授予 virtualenv nafd 文件夹的所有权。该文件夹包含 django 应用程序和 python2.7。
sudo chown -R nafd_it /env/nafd
sudo chmod -R g+w /env/nafd
在我的根虚拟环境中,当我启动我的 python2.7 时,我可以导入时间模块。 但是当我改变用户时
su - nafd_it
-bash-4.1$ source bin/activate
(nafd)-bash-4.1$ python
当我发出import time时在python环境中
我来了
ImportError: No module named time
我已经将/env/nafd文件夹的文件夹权限更改为chmod -R ugo+rwx env/nafd
如何让用户 nafd_it 读取 python 模块?
【问题讨论】:
标签: django python-2.7 centos6