MycroftAI / mycroft-core

Mycroft Core, the Mycroft Artificial Intelligence platform.
https://mycroft.ai
Apache License 2.0
6.52k stars 1.27k forks source link

Install pip once only? #421

Closed aatchison closed 7 years ago

aatchison commented 7 years ago

We install pip twice in a dev workflow, once in build_hostsetup*.sh and another time in ./dev_setup.sh

aatchison commented 7 years ago

This is what I'm seeing.

  1. We install pip system-wide.
  2. Install virtualenv
  3. Create virtualenv for mycroft
  4. easy_install pip again, to ensure the version

This used to be fine, but now this issue regarding easy_install and sudo https://github.com/MycroftAI/mycroft-core/issues/414 I'm installing with sudo now, but kind of defeats the purpose of having a project specific development environment

What would the best course of action be?

Pssst. Help me @clusterfudge

clusterfudge commented 7 years ago

build_host_setup installs pip as a system wide dependency; it is a transitive dependency of virtualenv.

In dev_setup, we install pip at a fixed version (inside the mycroft virtualenv) for consistency. Using sudo would install pip outside the virtualenv, which would not affect anything that happened inside the virtualenv. The issue in #414 is likely that virtualenv creation or activation failed, so easy install is trying to install globally, which will fail without sudo.

TL/DR; expected behavior, is fine.

aatchison commented 7 years ago

Thanks for untangling my brain on that one