Вопрос

I installed Django with

C:\Python27\Lib\site-packages>pip install -e git+https://github.com/django/django.git#egg=django

Unfortunately some programs (such as PyDev), work "easier" when your packages are in the site-packages directory.

How do I force pip to install it in site-packages, rather than provide just a Django.egg-link file there?

Это было полезно?

Решение

There's two things here.

  • First you need to get rid of the -e unless you plan on hacking on django itself. See here: http://www.pip-installer.org/en/latest/usage.html#edit-mode
  • Also with pydev you often need to tell it to reindex your site packages after installing something new. To do this you need to go into the interpreter settings and choose the interpreter for your current project. IIRC you can just open it, hit apply and it will reindex your site packages.

Hope that helps :)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top