Where to manually place extra python resources
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 :
>> 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.
>>  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/
__init__.py __init__.pyc client.py client.pyc
PKG-INFO entry_points.txt zip-safe
More information about the macports-users