Where to manually place extra python resources

Jeremy Lavergne jeremy at lavergne.gotdns.org
Wed Mar 20 10:34:21 PDT 2013

>>> Is there some more "standard" place under Mac OS where I can relocate the hl7 library so that my MacPorts python can find it?
>> Well, `pip install --user` puts things into the user-site.
> I am maybe missing the relevance of pip to MacPorts

pip is the python package manager; if python's able to use packages in those directories then manually putting something in there will be accessible, regardless of MacPorts' involvement.

>> Python's documentation (PEP 370 - Per user site-packages directory) says [1]:
>> On Mac OS X Python uses ~/.local directory as well. Framework builds of Python include ~/Library/Python/2.6/site-packages as an additional search path.
>> [1] http:/www.python.org/dev/peps/pep-0370/
> My ~/Library/ contains no Python
> My ~/.local contains only the directory /share and after I deposited into ~/.local/ the hl7 directory and the files contained therein, the required import did not work, so I seem no further ahead.

So just create the directories and try it? I ran the pip command (`pip install --user hl7) and here's what it installed:

$ ls -R ~/Library/Python/

bin lib




hl7                      hl7-0.2.5-py2.7.egg-info

__init__.py  __init__.pyc client.py    client.pyc

PKG-INFO             entry_points.txt     zip-safe
SOURCES.txt          installed-files.txt
dependency_links.txt top_level.txt

More information about the macports-users mailing list