{"action":"closed","issue":{"url":"https://api.github.com/repos/CellProfiler/BatchProfiler/issues/14","repository_url":"https://api.github.com/repos/CellProfiler/BatchProfiler","labels_url":"https://api.github.com/repos/CellProfiler/BatchProfiler/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/CellProfiler/BatchProfiler/issues/14/comments","events_url":"https://api.github.com/repos/CellProfiler/BatchProfiler/issues/14/events","html_url":"https://github.com/CellProfiler/BatchProfiler/issues/14","id":113887760,"number":14,"title":"Use virtual environment post-centrosome","user":{"login":"LeeKamentsky","id":660469,"avatar_url":"https://avatars.githubusercontent.com/u/660469?v=3","gravatar_id":"","url":"https://api.github.com/users/LeeKamentsky","html_url":"https://github.com/LeeKamentsky","followers_url":"https://api.github.com/users/LeeKamentsky/followers","following_url":"https://api.github.com/users/LeeKamentsky/following{/other_user}","gists_url":"https://api.github.com/users/LeeKamentsky/gists{/gist_id}","starred_url":"https://api.github.com/users/LeeKamentsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeeKamentsky/subscriptions","organizations_url":"https://api.github.com/users/LeeKamentsky/orgs","repos_url":"https://api.github.com/users/LeeKamentsky/repos","events_url":"https://api.github.com/users/LeeKamentsky/events{/privacy}","received_events_url":"https://api.github.com/users/LeeKamentsky/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-28T18:14:47Z","updated_at":"2016-03-03T19:46:24Z","closed_at":"2016-03-03T19:46:24Z","body":"If CellProfiler's requirements.txt file names a version of centrosome, then we should use a virtual environment to pick the version (and in the future, this strategy will make it easier to install CellProfiler when its setup becomes standardized). Do the following:\r\n\r\n    . <path-to>/cpenv.sh\r\n    virtualenv --system-site-packages <target-dir>\r\n    . <target-dir>/bin/activate\r\n    pip install pytest\r\n    pip install --no-deps https://github.com/CellProfiler/centrosome/archive/<version>.tar.gz\r\n\r\nand then when running CellProfiler, source the virtual environment when running it. I'm not sure why you need to explicitly `pip install pytest` - setup fails for me with the stack trace below if I don't.\r\n\r\n\r\n    Traceback (most recent call last):\r\n      File \"<string>\", line 20, in <module>\r\n      File \"/tmp/pip-r3_TYw-build/setup.py\", line 111, in <module>\r\n        version=\"1.0.2\",\r\n      File \"/imaging/analysis/CPCluster/CellProfiler-2.0/builds/redhat_6/lib/python2.7/distutils/core.py\", line 112, in setup\r\n        _setup_distribution = dist = klass(attrs)\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/dist.py\", line 268, in __init__\r\n        self.fetch_build_eggs(attrs['setup_requires'])\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/dist.py\", line 313, in fetch_build_eggs\r\n        replace_conflicting=True,\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/pkg_resources/__init__.py\", line 830, in resolve\r\n        dist = best[req.key] = env.best_match(req, ws, installer)\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/pkg_resources/__init__.py\", line 1075, in best_match\r\n        return self.obtain(req, installer)\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/pkg_resources/__init__.py\", line 1087, in obtain\r\n        return installer(requirement)\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/dist.py\", line 380, in fetch_build_egg\r\n        return cmd.easy_install(req)\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/command/easy_install.py\", line 629, in easy_install\r\n        return self.install_item(spec, dist.location, tmpdir, deps)\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/command/easy_install.py\", line 659, in install_item\r\n        dists = self.install_eggs(spec, download, tmpdir)\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/command/easy_install.py\", line 842, in install_eggs\r\n        return self.build_and_install(setup_script, setup_base)\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/command/easy_install.py\", line 1070, in build_and_install\r\n        self.run_setup(setup_script, setup_base, args)\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/command/easy_install.py\", line 1056, in run_setup\r\n        run_setup(setup_script, args)\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 240, in run_setup\r\n        raise\r\n      File \"/imaging/analysis/CPCluster/CellProfiler-2.0/builds/redhat_6/lib/python2.7/contextlib.py\", line 35, in __exit__\r\n        self.gen.throw(type, value, traceback)\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 193, in setup_context\r\n        yield\r\n      File \"/imaging/analysis/CPCluster/CellProfiler-2.0/builds/redhat_6/lib/python2.7/contextlib.py\", line 35, in __exit__\r\n        self.gen.throw(type, value, traceback)\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 152, in save_modules\r\n        yield saved\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 126, in __exit__\r\n        self._saved = UnpickleableException.dump(type, exc)\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n      File \"/imaging/cold/People/Lee/venv/cpvenvtest/lib/python2.7/site-packages/setuptools/sandbox.py\", line 110, in dump\r\n        return cls.dump(cls, cls(repr(exc)))\r\n    MemoryError\r\n    \r\n    ----------------------------------------\r\n    Command \"python setup.py egg_info\" failed with error code 1 in /tmp/pip-r3_TYw-build"}}