Pip无法安装aldryn国家/地区细分市场要求

时间:2016-02-27 04:11:13

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

我已经使用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')

这有明显的解决方法吗?

1 个答案:

答案 0 :(得分:0)

下载并将文件保存在系统中的某个位置。 然后解压缩并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作为依赖项。 (用同样的方式)