Open heycyril opened 6 years ago
项目所需模块因为网络问题安装失败了
Dockerfile修改为RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r /mnt/OpsManage/requirements.txt 另外requirements.txt 里面修改pyasn1==0.4.4,requests看情况可修改可不改。
模块依赖问题,看到这样的提示: asgi-redis 1.4.3 has requirement redis~=2.10.6, but you'll have redis 3.0.1 which is incompatible. requests 2.21.0 has requirement chardet<3.1.0,>=3.0.2, but you'll have chardet 2.2.1 which is incompatible.
改了下requirements.txt
Django==1.11.7 asgi-redis==1.4.3 asgiref==1.1.2 channels==1.1.7 Celery==3.1.20 django-celery==3.2.2 celery-with-redis djangorestframework==3.5.3 djangorestframework-jwt==1.11.0 paramiko==2.4.1 Pillow==5.0.0 python-magic==0.4.15 django-storages==1.6.5 PyNaCl==1.2.1 pycparser==2.18 pyasn1==0.4.5 ansible==2.3.3 supervisor mysql-replication pymysql redis==2.10.6 MySQL-python DBUtils xlrd chardet==3.0.2 requests==2.21.0 xlwt
再试通过了
构建docker镜像到这里一直过不去 Running setup.py install for DBUtils: finished with status 'done' Successfully installed Automat-0.7.0 Celery-3.1.20 DBUtils-1.3 Django-1.11.7 MarkupSafe-1.0 MySQL-python-1.2.5 Pillow-5.0.0 PyHamcrest-1.9.0 PyJWT-1.6.4 PyYAML-3.13 amqp-1.4.9 ansible-2.3.3.0 anyjson-0.3.3 asgi-redis-1.4.3 asgiref-1.1.2 attrs-18.1.0 autobahn-18.8.1 billiard-3.3.0.23 celery-with-redis-3.0 certifi-2018.8.24 channels-1.1.7 constantly-15.1.0 daphne-1.4.2 django-celery-3.2.2 django-storages-1.6.5 djangorestframework-3.5.3 djangorestframework-jwt-1.11.0 hyperlink-18.0.0 incremental-17.5.0 jinja2-2.10 kombu-3.0.37 meld3-1.0.2 msgpack-python-0.5.6 mysql-replication-0.18 pyasn1-0.4.2 pycrypto-2.6.1 pymysql-0.9.2 python-magic-0.4.15 pytz-2018.5 redis-2.10.6 requests-2.19.1 supervisor-3.3.4 twisted-18.7.0 txaio-18.8.1 urllib3-1.23 xlrd-1.1.0 xlwt-1.3.0 zope.interface-4.5.0 Traceback (most recent call last): File "/usr/bin/pip", line 11, in
sys.exit(main())
File "/usr/lib/python2.7/site-packages/pip/_internal/init.py", line 310, in main
return command.main(cmd_args)
File "/usr/lib/python2.7/site-packages/pip/_internal/basecommand.py", line 180, in main
timeout=min(5, options.timeout)
File "/usr/lib/python2.7/site-packages/pip/_internal/basecommand.py", line 77, in _build_session
insecure_hosts=options.trusted_hosts,
File "/usr/lib/python2.7/site-packages/pip/_internal/download.py", line 337, in init
self.headers["User-Agent"] = user_agent()
File "/usr/lib/python2.7/site-packages/pip/_internal/download.py", line 126, in user_agent
setuptools_version = get_installed_version("setuptools")
File "/usr/lib/python2.7/site-packages/pip/_internal/utils/misc.py", line 832, in get_installed_version
working_set = pkg_resources.WorkingSet()
File "/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/init.py", line 554, in init
self.add_entry(entry)
File "/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/init.py", line 610, in add_entry
for dist in find_distributions(entry, True):
File "/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/init.py", line 1876, in find_eggs_in_zip
if metadata.has_metadata('PKG-INFO'):
File "/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/init.py", line 1395, in has_metadata
return self.egg_info and self._has(self._fn(self.egg_info, name))
File "/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/init.py", line 1750, in _has
return zip_path in self.zipinfo or zip_path in self._index()
File "/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/init.py", line 1627, in zipinfo
return self._zip_manifests.load(self.loader.archive)
File "/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/init.py", line 1584, in load
mtime = os.stat(path).st_mtime
OSError: [Errno 2] No such file or directory: '/usr/lib/python2.7/site-packages/pyasn1-0.4.4-py2.7.egg'
The command '/bin/sh -c pip install -r /mnt/OpsManage/requirements.txt && cd /mnt/OpsManage/ && python manage.py makemigrations OpsManage && python manage.py makemigrations wiki && python manage.py makemigrations orders && python manage.py makemigrations filemanage && python manage.py migrate && python manage.py loaddata superuser.json' returned a non-zero code: 1