Don't forget to install Elcapitan and re-install it.
Import your own library as follows.
import hge
Also, use your own module as follows.
$ etti.py
Check the search path with a script like the following.
test.py
import sys
A= sys.path
for i in A:
print i
$ python test.py
/Users/XXXXX/Desktop
/Users/XXXXX/.pyenv/versions/2.7.10/lib/python27.zip
/Users/XXXXX/.pyenv/versions/2.7.10/lib/python2.7
/Users/XXXXX/.pyenv/versions/2.7.10/lib/python2.7/plat-darwin
/Users/XXXXX/.pyenv/versions/2.7.10/lib/python2.7/plat-mac
/Users/XXXXX/.pyenv/versions/2.7.10/lib/python2.7/plat-mac/lib-scriptpackages
/Users/XXXXX/.pyenv/versions/2.7.10/lib/python2.7/lib-tk
/Users/XXXXX/.pyenv/versions/2.7.10/lib/python2.7/lib-old
/Users/XXXXX/.pyenv/versions/2.7.10/lib/python2.7/lib-dynload
/Users/XXXXX/.pyenv/versions/2.7.10/lib/python2.7/site-packages
Add mymodules.pth
to site-packages in the searched directory.
The content describes the location where the self-made module is placed (~ / .mymodules
in my case).
mymodules.pth
~/.mymodules
Also, add the following to .bash_profile
. (If you can't use it with ʻetti.py`, check the permissions.)
export PATH=$PATH:/Users/XXXXX/.mymodules
Recommended Posts