0

The graph-tool was installed to Ubuntu 16.04.1.

I would like to use the graph-too together with other Python modules which were installed on a virtual env.

Is there any way to use a shared module on a virtual env?

Benben
  • 1,355
  • 5
  • 18
  • 31

2 Answers2

1

Create your virtualenv with the system site-packages directory included; use the --system-site-packages switch:

$ virtualenv --help
[...]
  --system-site-packages
                        Give the virtual environment access to the global
                        site-packages.
[...]

You can change this setting by re-running virtualenv on an existing virtual env directory, and disable it again by using the --no-site-packages switch.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
0

Take a look at the virtualenv-docs/configuration page for additional options/scenarios.

--system-site-packages Give the virtual environment access to the global site-packages.

--extra-search-dir=DIR Directory to look for setuptools/pip distributions in. This option can be specified multiple times.

$ virtualenv --extra-search-dir=/path/to/dists --extra-search-dir=/path/to/other/dists ENV

Also, you can try looking for the answer on stackoverflow, like this one, before you post a new question.

Community
  • 1
  • 1
ILMostro_7
  • 1,422
  • 20
  • 28
  • Thanks for finding a duplicate post. Please leave chiding the OP out of your answer posts; that's meta chatter that's not part of the answer. Moreover, if you found a duplicate, please do flag the post as such. – Martijn Pieters Sep 10 '16 at 15:37