python - 安装 requirements.txt 在 Django 上引发错误
问题描述
直到最近,当我为我的数据库创建一个模型并尝试 pip install requirements.txt 时,该项目才运行良好。我已经完成了我所知道的一切,包括修改我settings.py
的以添加缺少的库、重新安装django
和psycopg2
,一切都无济于事。这是我的requirement.txt
:
tweepy==3.8.0
django
gunicorn
django-heroku
我得到的错误:
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/Users/apple/Downloads/font_text/python-getting-started/getting-started/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/tn/843ff_ns4j5ddf0fyc998v6c0000gn/T/pip-install-phi9wroh/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 /private/var/folders/tn/843ff_ns4j5ddf0fyc998v6c0000gn/T/pip-record-sc3y24vo/install-record.txt --single-version-externally-managed --compile --install-headers /Users/apple/###/###/PROJECTFOLDER/getting-started/include/site/python3.7/psycopg2" failed with error code 1 in /private/var/folders/tn/843ff_ns4j5ddf0fyc998v6c0000gn/T/pip-install-phi9wroh/psycopg2/
解决方案
根据错误消息,您需要openssl-devel
在系统上安装该软件包。
推荐阅读
- python-2.7 - 为什么在使用 aws 胶水将 csv 转换为 parquet 时创建了多个文件?
- amazon-web-services - Lambda 无法访问互联网
- javascript - 如何访问通过函数传回的承诺?
- python - python中的错误排列
- java - 如何解决 - 控制台错误日志无法写入 Log4j2 配置文件
- javascript - 根据对象数组对字符串数组进行排序
- r - R:2019 年更改后的网络抓取 yahoo.finance
- javascript - ChartJS - 饼图的标签太长并隐藏饼图
- ios - 如何确保两个屏幕只支持纵向模式?
- r - 尝试使用 gl_model 函数时,数据框具有不同的维度