1

I want to install pysheng on my computer (macos sierra 10.12). So I download the Zip file and unzip it, the run following code to install it.

sudo python setup.py install

The package is installed to

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/

Then, I try to run the package but failed.

pysheng "http://books.google.com/books?id=m5w5PRj5Nj4C"

The error message is

-bash: pysheng: command not found.

I have macport installed in my computer and there is a line in my .bash_profile

export PATH="/opt/local/bin:/opt/local/sbin:$PATH"

I don't know if it has something to do with this. So anyone have a clue? Thanks!

wenhao
  • 11
  • 2

2 Answers2

2

you have to reload bash for it to pick it up.

run source ~/.bash_profile or restart your terminal.

bryce
  • 3,022
  • 1
  • 15
  • 19
0

You should not put your own modules into the prefix controlled by MacPorts. This is likely to lead to conflicts, as when pysheng was added to MacPorts, files to be installed are already on your system. Do not use sudo to install software into /opt/local. As setuptools does not have a way to uninstall this, you will have to clean this up manually.

To install your own python modules, either just install them to your $HOME and export PATH and PYTHONPATH in the environment accordingly or create a virtualenv.

raimue
  • 4,322
  • 1
  • 21
  • 31