【问题标题】:Pip fails to install aldryn country segment requirementsPip 未能安装 aldryn 国家/地区段要求
【发布时间】:2016-06-10 11:38:02
【问题描述】:

我已使用 pip 安装了 aldryn-segmentation,并尝试按照文档建议使用 pip install https://github.com/aldryn/aldryn-country-segment/archive/master.zip 安装 aldryn-country-segment。 但是我收到一个错误,它找不到满足要求的版本 aldryn-geoip

Collecting aldryn-geoip (from aldryn-country-segment==0.7.2)
  Could not find a version that satisfies the requirement aldryn-geoip (from aldryn-country-segment==0.7.2) (from versions: )
No matching distribution found for aldryn-geoip (from aldryn-country-segment==0.7.2)

或者在下载文件并运行 python setup.py install 时,它给了我这个:(在很多其他文本之后)

Processing dependencies for aldryn-country-segment==0.7.2
Searching for aldryn-geoip
Reading https://pypi.python.org/simple/aldryn-geoip/
Couldn't find index page for 'aldryn-geoip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or download links found for aldryn-geoip
error: Could not find suitable distribution for Requirement.parse('aldryn-geoip')

是否有明显的解决方法?

【问题讨论】:

  • 请添加输出的所有相关部分!
  • github.com/aldryn/aldryn-country-segment 有:NOTICE This app will not work on Aldryn until Aldryn includes the MaxMind GeoIP C-API into their build pack. 所以我不确定是否有解决方法
  • 已添加输出。我看到了,但我认为这意味着你不能在 Aldryn 服务上使用它,但仍然在你自己的项目中使用它。据我了解,Aldryn 托管 DjangoCMS 项目,但这不是我使用它的目的。
  • 尝试从 *.tar.gz 文件安装。不是点子方式。
  • @PouyaAbbassi 我在哪里可以找到这个包的 *.tar.gz?它还没有被添加到 pip 中,所以我一直在直接从 github 安装。

标签: python django python-2.7 pip django-cms


【解决方案1】:

下载文件并将其保存在系统中的某个位置。 然后解压并cd到目录。你会得到这样的东西:

.
├── addon.json                                                                                                                                                                   
├── aldryn_config.py                                                                                                                                                             
├── country_segment                                                                                                                                                              
│   ├── cms_plugins.py                                                                                                                                                           
│   ├── __init__.py                                                                       │   ├── locale
│   │   └── fr
│   │       └── LC_MESSAGES
│   │           ├── django.mo
│   │           └── django.po
│   ├── middleware
│   │   ├── __init__.py
│   │   └── resolve_country_code_middleware.py
│   ├── migrations
│   │   ├── 0001_initial.py
│   │   └── __init__.py
│   ├── models.py
│   └── south_migrations
│       ├── 0001_initial.py
│       └── __init__.py
├── LICENSE.txt
├── README.md
├── schemamigration.py
└── setup.py

7 directories, 17 files

然后运行sudo python setup.py install,python 会将包安装到您的系统中。
您可能还需要安装 aldryn-geoip 作为依赖项。 (用同样的方法)

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2012-01-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-04-07
  • 2021-05-02
相关资源
最近更新 更多