0

私はdjango-nonrelを正しい方法でインストールしようとしています-そしてプロセスを再現できるようにしています

私はpipを使用してdjango-nonrelをインストールしました-次のように:

pip install git+https://github.com/django-nonrel/django-nonrel.git
pip install git+https://github.com/django-nonrel/django-dbindexer.git
pip install git+https://github.com/django-nonrel/django-permission-backend-nonrel
pip install hg+https://bitbucket.org/wkornewald/djangoappengine
pip install hg+https://bitbucket.org/wkornewald/djangotoolbox
pip install hg+https://bitbucket.org/twanschik/django-autoload
pip install hg+https://bitbucket.org/twanschik/nonrel-search/src

インストール後、次のreq.txtファイルを取得しました(pipfreeze> req.txt):

Django==1.3.1
django-autoload==0.01
django-dbindexer==0.3
djangoappengine==1.0
djangotoolbox==0.9.2
nonrel-search==0.1
permission-backend-nonrel==0.1
wsgiref==0.1.2

しかし、req.txtファイルを使用して同じものを取得することはできません。パッケージ(例:django-autoload)をアンインストールし、要件ファイルを使用して再度取得しようとした場合

(gae-first)bentzy@lama:~/.virtualenvs/gae-first$ pip uninstall django-autoload
Uninstalling django-autoload:
...
Successfully uninstalled django-autoload
(gae-first)bentzy@lama:~/.virtualenvs/gae-first$ pip install -r req.txt 
Requirement already satisfied (use --upgrade to upgrade): Django==1.3.1       in ./lib/python2.7/site-packages (from -r req.txt (line 1))
Downloading/unpacking django-autoload==0.01 (from -r req.txt (line 2))
Could not find any downloads that satisfy the requirement django-autoload==0.01 (from -r req.txt (line 2))
No distributions at all found for django-autoload==0.01 (from -r req.txt (line 2))
Storing complete log in /home/bentzy/.pip/pip.log

これらのパッケージがpipリポジトリにないのはなぜですか?

それらをインストールするためにpipを使用することはまだ意味がありますか?

4

2 に答える 2

4

問題は、要件ファイルに十分な情報がないことです。

たとえば、pipインストールを要求すると、そのパッケージの PyPI が調べられます (そして、PyPI エントリを見つけた後、いくつかのページを破棄します)。django-autoload

1 つずつインストールするときと同じ方法でこれらのパッケージをダウンロードする要件ファイルが必要な場合は、同じことを行います。パッケージの場所を pip に指示します。

次のような要件ファイルを作成します。

git+https://github.com/django-nonrel/django-nonrel.git
git+https://github.com/django-nonrel/django-dbindexer.git
git+https://github.com/django-nonrel/django-permission-backend-nonrel
hg+https://bitbucket.org/wkornewald/djangoappengine
hg+https://bitbucket.org/wkornewald/djangotoolbox
hg+https://bitbucket.org/twanschik/django-autoload
hg+https://bitbucket.org/twanschik/nonrel-search/src

または、特定のタグまたはコミットからインストールする場合は、次のようにします。

git+https://github.com/django-nonrel/django-nonrel.git@1.3.1#egg=Django

要件ファイルの詳細については、http://www.pip-installer.org/en/latest/logic.html#requirements-file-formatを参照してください。

于 2013-01-29T23:14:25.113 に答える
0

使用するすべてのパッケージが実際の G​​AE プロジェクト フォルダーにある必要があるため、GAE を使用している場合に pip を使用しても意味がありません。システムまたは virtualenv 環境にインストールされたパッケージは、GAE 運用サーバーにアップロードされません。

于 2013-01-29T17:30:29.860 に答える