安装requirements.txt

时间:2017-09-18 13:50:06

标签: python django postgresql wagtail

我是Wagtail cms的新手,正在为他的网站接管一个朋友的项目。

我已经下载了他的回购邮件,并试图让它在本地运行。我已按照wagtail文档http://docs.wagtail.io/en/v1.12.1/getting_started/index.html

上的步骤进行操作

但是在网站的requirements.txt文件中,有一些依赖项没有安装并给出错误:

这是尝试安装要求时的输出:

build\lib.win32-2.7\psycopg2\_psycopg.pyd : fatal error LNK1120: 62 unresolved externals
error: command 'C:\\Users\\Adam\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\link.exe' failed with exit status 1120

 Rolling back uninstall of psycopg2
Command "c:\python27\python.exe -u -c "import setuptools, 
tokenize;__file__='c:\\users\\Adam\\appdata\\local\\temp\\pip-build-
bykm5e\\psycopg2\\setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, 
__file__, 'exec'))" install --record c:\users\Adam\appdata\local\temp\pip-
cidizd-record\install-record.txt --single-version-externally-managed --
compile" failed with error code 1 in c:\users\Adam\appdata\local\temp\pip-
build-bykm5e\psycopg2\

(完整输出在这里:https://pastebin.com/m1ukkei8

任何帮助将不胜感激 - 我使用的是Python 2.7,并尝试重新安装psycopg并安装了postresql

2 个答案:

答案 0 :(得分:1)

您的Windows链接器会丢失错误,因为您没有c ++库可以正确构建扩展。

我建议您通过方向盘file

安装它

运行

pip install some-package.whl

答案 1 :(得分:1)

我不确定这是否是答案,但由于a bug,您使用的psycopg2版本some bug in pip阻止了使用pip进行安装。尝试使用2.5.3版,看看是否可以修复它。

相关问题