Skip to content Skip to sidebar Skip to footer

Python 3: Good Location(s) To Install Own And 3rd Party Packages?

For Python 3.x: I'd like advice on best directory in which to locate modules that I want to use across multiple projects (and any related factors). I know about the import stateme

Solution 1:

  1. Yes -- but let your setup.py do it

  2. No

  3. Why do you think there is a problem?

  4. The docs need fixing. The default Python install directory is C:\PythonXY, not C:\Python. The default package install directory is C:\PythonXY\Lib\site-packages.

Solution 2:

You might wish to consider setting up a virtualenv, which is the standard way of bundling a set of modules for use across projects and platforms.

Solution 3:

Coincidentally, it's the anniversary of my asking this question. Though the respondents attempted to be helpful, I ended up investigating this issue in substantially more depth. That led to notes which I posted here: Python- Organization for common modules. Also some issue reports at python.org (same user name), and some revisions to their documentation. I hope that helps others who are similarly stumped.

Solution 4:

Per-user site-packages directory is another option. You can try it with:

python setup.py install --user

Installing to %APPDATA%\Python\Python32 is much more lightweight than creating a whole new virtualenv. This is what PyPM does by default.

Post a Comment for "Python 3: Good Location(s) To Install Own And 3rd Party Packages?"