I'm confused by pip installations
<p>I have recently begun having troubles using pip to install python packages. I have always used pip but never really understood how it actually works, my experience with it is basically limited to "pip install pkg". </p>

<p>Recently when trying to install openCV on my machine, I followed a few guides that involved changing paths etc. Since making these changes I have been having trouble using pip to install packages correctly. </p>

<p>Now when I run "pip3 install pkg", the install runs fine without any errors. When I try to import the module in python however, python cannot find the package. If I run "pip3 list" in the terminal I get a list of modules that is different to running help('modules') within python. </p>

<p>I think pip is installing the packages to a different location than my version of python is referencing when importing modules? </p>

<p>Is there a way I can change where pip installs to? What did it mean to change paths and how can I avoid this in the future?</p>

<p>Thanks in advance. </p>

<p>EDIT: I should mention that running "python3 -m pip install pkg" installs the packages correctly. </p>

<p>Because you have 2 versions of python installed, the best solution is to install and use <a href="http://%20https://pypi.python.org/pypi/virtualenv" rel="nofollow" title="virtualenv">virtualenv</a></p>

<p>A Virtual Environment is a tool to keep all dependencies required by different projects and python versions in separate places. It solves the problem you mentioned and keeps your site-packages directory manageable.</p>

python terminal pip