DSM 2647
Python package 2.7.2-006, from Synology
using tar.gz or egg
== tar.gz
- Download tar.gz file of setuptools from http://pypi.python.org/pypi/setuptools. The version when I test is "setuptools-0.6c11.tar.gz".
- Extract tar.gz file. In command line, you can type "tar xvf setuptools-0.6c11.tar.gz"
- In the setuptools folder, type "python setup.py install"
- Create symbolic link for easy_install "ln -s /var/packages/Python/target/usr/bin/easy_install /usr/bin/"
== egg
- Download setuptools egg file from http://pypi.python.org/pypi/setuptools, choose py2.7 version. The version when I test is "setuptools-0.6c11-py2.7.egg".
- Here comes tricky part. Due to setuptools egg use python2.7 to exec the following action, but Synology Python package only creates symbolic link in /usr/bin/python. So run "sh setuptools-0.6c11-py2.7.egg" will get 「setuptools-0.6c11-py2.7.egg: exec: line 8: python2.7: not found」. So we need to modify the egg file. Type "vi setuptools-0.6c11-py2.7.egg" and change the python2.7 to python.
- Run "sh setuptools-0.6c11-py2.7.egg".
- Create symbolic link for easy_install "ln -s /var/packages/Python/target/usr/bin/easy_install /usr/bin/"
Now we can use easy_install to install other Python package.
No comments:
Post a Comment