2015-01-13 73 views
0

我想我的代碼部署到彈性豆莖,彈性豆莖部署有錯誤

有錯誤:

而且我不知道有什麼問題,請幫幫我。謝謝!!

Command /opt/python/run/venv/bin/python27 -c "import setuptools, tokenize;__file__='/opt/python/run/venv/build/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-tgTtHY-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/python/run/venv/include/site/python2.7 failed with error code 1 in /opt/python/run/venv/build/lxml 
Storing debug log for failure in /root/.pip/pip.log 
2015-01-13 06:25:55,467 ERROR Error installing dependencies: Command '/opt/python/run/venv/bin/pip install --use-mirrors -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1 
Traceback (most recent call last): 
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 36, in main 
    install_dependencies() 
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 31, in install_dependencies 
    check_call('%s install --use-mirrors -r %s' % (os.path.join(APP_VIRTUAL_ENV, 'bin', 'pip'), requirements_file), shell=True) 
    File "/usr/lib64/python2.6/subprocess.py", line 505, in check_call 
    raise CalledProcessError(retcode, cmd) 
CalledProcessError: Command '/opt/python/run/venv/bin/pip install --use-mirrors -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1 (Executor::NonZeroExitStatus) 

.ebextensions/01.config

packages: 
    yum: 
     gcc: '' 
     python27-devel: '' 
     postgresql93-devel: '' 
     pkgconfig: '' 
     libffi-devel: '' 
     libxslt-devel: '' 
     libxml2-devel: '' 
+0

你看過/root/.pip/pip.log中的日誌文件,看看它說了什麼嗎? –

回答

0

如果你看一下日誌,看看這包是給你的問題,它可能只是想要你允許外部的和允許,未經驗證。在你的requirements.txt文件的上面,你已經聲明瞭你的包裹,請做以下操作: --allow-external ExternalPackage --allow-unverified ExternalPackage ExternalPackage

希望這會有所幫助。你可以看到更多的例子 - https://pip.pypa.io/en/latest/reference/pip_install/#requirements-file-format

0

我知道這個問題有點過時,但想要拋出我的修復,以防其他人在那裏仍然有問題。

不知道這是否正是您遇到的問題,但EBS不斷拒絕我想要安裝的外部Python包。所以我從我的requirements.txt文件中刪除了外部軟件包,而是在我的.ebextenions中添加了一些命令。

下面是我添加的內容,它的工作完美無瑕。

​​

不知道這是EBS的工作推薦的方式,但它是讓我的安裝包的最簡單方法。希望這可以幫助!

+0

非常感謝。雖然我現在不使用彈性beanstalk。還是非常感謝你 – user2492364