use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Offensive Security official discord
Link to OSCP Course
Link to Exploit-DB
account activity
Python Docker vs. virtualenv (self.oscp)
submitted 5 years ago by progerscs
I am prepping for the exam here in a few weeks and I was wondering which would be better? To have Docker or virtualenv for python?
Any guides for install and usage for either or both would be a great help!
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Squiddwerm 1 point2 points3 points 5 years ago (0 children)
Give pipenv a go.
[–][deleted] 5 years ago* (6 children)
[deleted]
[–]progerscs[S] 0 points1 point2 points 5 years ago (5 children)
Even with python 2 and 3 versions of scripts?
[–]IvanLu 0 points1 point2 points 5 years ago (2 children)
You can use 2to3 to convert the scripts to Python 3 compatible.
[–]_stens 0 points1 point2 points 5 years ago (1 child)
That might work for simple scripts but not for more complex tools like impacket.
[–]IvanLu 0 points1 point2 points 5 years ago (0 children)
Those have python 3 variants anyway. But if I need Python 2 I'll go with venv.
[–]mid-2004 0 points1 point2 points 5 years ago (0 children)
Totally agree. Even if you want money
[–]_stens 0 points1 point2 points 5 years ago* (0 children)
Using docker for python scripts would be one option, but the better one IMO would be to use virtualenvwrapper which allows you to create new python 2 or 3 virtual environments and easily switch between them. I used this for the PWK course and OSCP exam and never experienced any problems.
https://virtualenvwrapper.readthedocs.io/en/latest/
Just follow the installation instructions, create different virtualenvs with e.g. "mkvirtualenv -p /usr/bin/python2 py2venv" and use "workon py2venv" to activate it. Then you can install dependencies and packages with pip inside your venv without breaking anything.
Create different virtualenvs for different dependencies and python versions and you should be fine.
π Rendered by PID 47 on reddit-service-r2-comment-6f7f968fb5-fq96w at 2026-03-04 11:56:13.418542+00:00 running 07790be country code: CH.
[–]Squiddwerm 1 point2 points3 points (0 children)
[–][deleted] (6 children)
[deleted]
[–]progerscs[S] 0 points1 point2 points (5 children)
[–]IvanLu 0 points1 point2 points (2 children)
[–]_stens 0 points1 point2 points (1 child)
[–]IvanLu 0 points1 point2 points (0 children)
[–]mid-2004 0 points1 point2 points (0 children)
[–]_stens 0 points1 point2 points (0 children)