| Store | Cart

Re: [Tutor] Virtual environment question

From: Cameron Simpson <c...@cskk.id.au>
Mon, 12 Mar 2018 09:54:59 +1100
On 11Mar2018 15:52, jim <jf_b...@comcast.net> wrote:
>It was my understanding that using a virtual environment kept >everything isolated in that environment. So I was surprised when I got >the following error message.>>(env) j...@jims-mint18 ~ $>><snip>>File "/home/jfb/EVs/env/lib/python3.5/site-packages/selenium/webdriver/remote/remote_connection.py", >line 528, in _request>    resp = opener.open(request, timeout=self._timeout)>>  File "/usr/lib/python3.5/urllib/request.py", line 466, in open>    response = self._open(req, data)><snip>>>I snipped most of the error msg because for the purpose of this >question I am not interested in them. I tried  something that I did >not think would work and it did not.>>I am wondering why the path for the first line and every line above it >is /home/jfb/EVs/env and the second line and everything after is is>/usr/lib/.>>I didn't think anything from my system python would be involved if I started >from a virtual environment.

It is possible to make a virtualenv which references the osurce python's 
library. These days the default is isolation, but older virtualenvs used to 
hook to the original python by default. This is controlled by virtualenv's 
--system-site-packages and --no-site-packages. Maybe you should build the env 
again using --no-site-packages explicitly and see if the behaviour changes.

If you're not using the "virtualenv" command to make the environment, please 
tell use exactly how it was made (there are other tools for the same purpose).

In fact, tell us regardless. It aids debugging.

Cheers,
Cameron Simpson <c...@cskk.id.au> (formerly c...@zip.com.au)
_______________________________________________
Tutor maillist  -  Tut...@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Recent Messages in this Thread
Jim Mar 11, 2018 08:52 pm
Cameron Simpson Mar 11, 2018 10:54 pm
Jim Mar 12, 2018 12:44 am
eryk sun Mar 12, 2018 09:04 am
Jim Mar 13, 2018 01:31 am
eryk sun Mar 13, 2018 01:44 am
Jim Mar 13, 2018 09:35 pm
Mats Wichmann Mar 13, 2018 02:35 am
Messages in this thread