New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安装jumpserver ImportError: No module named django_crontab #835

Closed
zx289317972 opened this Issue Nov 30, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@zx289317972

zx289317972 commented Nov 30, 2017

[简述你的问题]
安装jumpserver 完成后启动失败,/var/log/jumpserver.log
Traceback (most recent call last):
File "./manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/usr/lib64/python2.7/site-packages/django/core/management/init.py", line 364, in execute_from_command_line
utility.execute()
File "/usr/lib64/python2.7/site-packages/django/core/management/init.py", line 338, in execute
django.setup()
File "/usr/lib64/python2.7/site-packages/django/init.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/lib64/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/usr/lib64/python2.7/site-packages/django/apps/config.py", line 94, in create
module = import_module(entry)
File "/usr/lib64/python2.7/importlib/init.py", line 37, in import_module
import(name)
ImportError: No module named django_crontab

使用版本

[Jumpserver版本 0.3.2]

问题复现步骤

20171130-15:34:11:unzip jumpserver-0.3.2.zip
20171130-15:34:20:cd jumpserver-0.3.2
20171130-15:34:32:cd install/
20171130-15:34:43:pip install -r requirements.txt
20171130-15:35:01:pip freeze
20171130-15:35:11:python install.py
20171130-15:35:18:vim install.py
20171130-15:35:30:python install.py

具体表现[截图可能会更好些,最好能截全]

请务必先查看wiki https://github.com/jumpserver/jumpserver/wiki
开始安装epel源
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package epel-release-7-11.noarch already installed and latest version
Nothing to do
开始安装依赖包
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package git-1.8.3.1-12.el7_4.x86_64 already installed and latest version
Package python2-pip-8.1.2-5.el7.noarch already installed and latest version
Package 1:mariadb-devel-5.5.56-2.el7.x86_64 already installed and latest version
Package rpm-build-4.11.3-25.el7.x86_64 already installed and latest version
Package gcc-4.8.5-16.el7.x86_64 already installed and latest version
Package automake-1.13.4-3.el7.noarch already installed and latest version
Package autoconf-2.69-11.el7.noarch already installed and latest version
Package python-devel-2.7.5-58.el7.x86_64 already installed and latest version
Package 2:vim-enhanced-7.4.160-2.el7.x86_64 already installed and latest version
Package sshpass-1.06-2.el7.x86_64 already installed and latest version
Package lrzsz-0.12.20-36.el7.x86_64 already installed and latest version
Package readline-devel-6.2-10.el7.x86_64 already installed and latest version
Nothing to do
开始安装依赖pip包
Uninstalling pycrypto-2.4.1:
Successfully uninstalled pycrypto-2.4.1
Requirement already satisfied: django==1.6 in /usr/local/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 2))
Collecting pycrypto==2.4.1 (from -r requirements.txt (line 3))
Downloading http://pypi.doubanio.com/packages/51/94/f62c78fd7f695ecf3e7b510e07daaf35504c9fcbe33d87e9df0fd84e1562/pycrypto-2.4.1.tar.gz (383kB)
100% |████████████████████████████████| 389kB 34.7MB/s
Requirement already satisfied: paramiko==1.16.0 in /usr/local/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 4))
Requirement already satisfied: ecdsa==0.13 in /usr/local/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 5))
Requirement already satisfied: MySQL-python==1.2.5 in /usr/local/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 6))
Requirement already satisfied: psutil==3.3.0 in /usr/local/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 8))
Requirement already satisfied: xlsxwriter==0.7.7 in /usr/local/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 9))
Requirement already satisfied: xlrd==0.9.4 in /usr/local/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 10))
Requirement already satisfied: django-bootstrap-form==3.2 in /usr/local/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 11))
Requirement already satisfied: tornado==4.3 in /usr/local/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 12))
Requirement already satisfied: ansible==1.9.4 in /usr/local/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 13))
Requirement already satisfied: pyinotify==0.9.6 in /usr/local/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 14))
Requirement already satisfied: passlib==1.6.5 in /usr/local/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 15))
Requirement already satisfied: argparse==1.4.0 in /usr/local/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 16))
Requirement already satisfied: django-crontab==0.6.0 in /usr/local/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 17))
Requirement already satisfied: django-smtp-ssl==1.0 in /usr/local/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 18))
Requirement already satisfied: pyte==0.5.2 in /usr/local/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 19))
Requirement already satisfied: backports.ssl_match_hostname in /usr/local/python2.7/lib/python2.7/site-packages (from tornado==4.3->-r requirements.txt (line 12))
Requirement already satisfied: singledispatch in /usr/local/python2.7/lib/python2.7/site-packages (from tornado==4.3->-r requirements.txt (line 12))
Requirement already satisfied: certifi in /usr/local/python2.7/lib/python2.7/site-packages (from tornado==4.3->-r requirements.txt (line 12))
Requirement already satisfied: backports_abc>=0.4 in /usr/local/python2.7/lib/python2.7/site-packages (from tornado==4.3->-r requirements.txt (line 12))
Requirement already satisfied: jinja2 in /usr/local/python2.7/lib/python2.7/site-packages (from ansible==1.9.4->-r requirements.txt (line 13))
Requirement already satisfied: PyYAML in /usr/local/python2.7/lib/python2.7/site-packages (from ansible==1.9.4->-r requirements.txt (line 13))
Requirement already satisfied: setuptools in /usr/local/python2.7/lib/python2.7/site-packages/setuptools-2.0-py2.7.egg (from ansible==1.9.4->-r requirements.txt (line 13))
Requirement already satisfied: wcwidth in /usr/local/python2.7/lib/python2.7/site-packages (from pyte==0.5.2->-r requirements.txt (line 19))
Requirement already satisfied: six in /usr/local/python2.7/lib/python2.7/site-packages (from singledispatch->tornado==4.3->-r requirements.txt (line 12))
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/python2.7/lib/python2.7/site-packages (from jinja2->ansible==1.9.4->-r requirements.txt (line 13))
Installing collected packages: pycrypto
Running setup.py install for pycrypto ... done
Successfully installed pycrypto-2.4.1
开始关闭防火墙和selinux
sed: can't read /etc/sysconfig/i18n: No such file or directory
Redirecting to /bin/systemctl stop iptables.service
Failed to stop iptables.service: Unit iptables.service not loaded.

请输入您服务器的IP地址,用户浏览器可以访问 [10.111.1.154]: ...
是否安装新的MySQL服务器? (y/n) [y]: n
请输入数据库服务器IP [127.0.0.1]: 127.0.0.1
请输入数据库服务器端口 [3306]: 3306
请输入数据库服务器用户 [jumpserver]: root
请输入数据库服务器密码: ******
请输入使用的数据库 [jumpserver]: jumpserver
连接数据库成功
请输入SMTP地址:
请输入SMTP端口 [25]:
请输入账户:
请输入密码:
please run connect() first
是否跳过(y/n) [n]? : y

    请登陆邮箱查收邮件, 然后确认是否继续安装

是否继续? (y/n) [y]: y
开始写入配置文件
开始安装Jumpserver ...
开始更新jumpserver
Creating tables ...
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

请输入管理员用户名 [admin]: admin
请输入管理员密码: [5Lov@wife]: admin
请再次输入管理员密码: [5Lov@wife]: admin
Starting jumpserver service:[FAILED]

安装成功,请访问web, 祝你使用愉快。
请访问 https://github.com/jumpserver/jumpserver/wiki 查看文档

其他

[注:] 完成后请关闭 issue

@ibuler

This comment has been minimized.

Show comment
Hide comment
@ibuler

ibuler Dec 1, 2017

Member

手动安装一下该模块

Member

ibuler commented Dec 1, 2017

手动安装一下该模块

@zx289317972

This comment has been minimized.

Show comment
Hide comment
@zx289317972

zx289317972 Dec 1, 2017

[root@izbp1ev2dnntlo0c8rw9xmz /tools/application/jumpserver-0.3.2/install]# pip install django_crontab
Requirement already satisfied: django_crontab in /usr/local/python2.7/lib/python2.7/site-packages
我不太懂python 是否是这样操作,结果install.py后结果一样

zx289317972 commented Dec 1, 2017

[root@izbp1ev2dnntlo0c8rw9xmz /tools/application/jumpserver-0.3.2/install]# pip install django_crontab
Requirement already satisfied: django_crontab in /usr/local/python2.7/lib/python2.7/site-packages
我不太懂python 是否是这样操作,结果install.py后结果一样

@ezhenyz

This comment has been minimized.

Show comment
Hide comment
@ezhenyz

ezhenyz Dec 4, 2017

你系统里装了两个python2.7,安装和启动的时候用的不是同一个

ezhenyz commented Dec 4, 2017

你系统里装了两个python2.7,安装和启动的时候用的不是同一个

@zx289317972

This comment has been minimized.

Show comment
Hide comment
@zx289317972

zx289317972 Dec 15, 2017

问题已解决,确实是安装多个python2.7导致的问题 。谢谢指点。

zx289317972 commented Dec 15, 2017

问题已解决,确实是安装多个python2.7导致的问题 。谢谢指点。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment