open-research / sumatra

http://neuralensemble.org/sumatra/
BSD 2-Clause "Simplified" License
127 stars 48 forks source link

Allow installing optional dependencies easily with pip #361

Closed jonc125 closed 7 years ago

jonc125 commented 7 years ago

Given there are constraints on (e.g.) the version of Django to use with Sumatra, it'd be nice to be able to do say pip install sumatra[django,git] and get the correct dependencies for working with the front-end and git repositories.

timtroendle commented 7 years ago

For Django this should always be the case when you pip install: Django is a mandatory dependency, and a compatible version will be installed should you not have any. You can always install optional dependencies with, for example, pip install sumatra[git] to install latest versions. Are there any concrete compatibility issues you are facing?

jonc125 commented 7 years ago

I did pip install sumatra django and got Django 1.11 installed...

timtroendle commented 7 years ago

I see and can reproduce. That's odd. It's not necessary to mention django explicitly though, and weirdly if you don't, it works: pip install sumatra will install Django 1.8. So with sumatra already installed you should be able to fix it with:

pip uninstall sumatra
pip install sumatra

It's unclear to me why pip installs an incompatible version when you mention it explicitly. I don't use pip a lot, so can't tell you what's going wrong. Maybe one of the other contributors can?

apdavison commented 7 years ago

I'm almost certain this is a problem with pip, not with Sumatra. As @timtroendle said, just pip install sumatra should automatically give you the correct version of Django.

(Note that updating Sumatra to work with the most recent Django is on my list of short-term plans - see #366)