ãããã¤ã³ã¿ã¼ãããã«pythonãåã¤ã³ã¹ãã¼ã«
ããããããã¨ããããå¼ã£ã¦ãããã¡ã«ã ãã ãç°å¢ããããã¦ããã®ã§
ãã£ããå
¨é¨æ¶ãã¦ããpythonãåã¤ã³ã¹ãã¼ã«ããã¨ãã¾ãã
ã¾ãã¯ãæé¤
%find /home/cimadai -name "*python*"
ã§ããããããã®ããªã¹ãã¢ãããããã®ã§ãããã¤ããæ¶ãã
ã³ãã³ãã¯â
%rm -rf dir_name
-
- [r]ã¯ãã£ã¬ã¯ããªãã¨åé¤
- [f]ã¯ç¢ºèªãªãã§å¼·å¶çã«åé¤
pythonã®ã¤ã³ã¹ãã¼ã«ã
ã¨ãã£ã¦ããããã¤ã³ã¿ã¼ãããã«ã¯ãã§ã«pythonãå
¥ã£ã¦ãã¾ãã
ããããããã¨èªåã§ãããããå¹´é ãªã®ã§ãvirtual-pythonã¨ãã
ãã®ãå©ç¨ãã¦ä¸ããç°å¢ãä½ã£ã¦ããããã¨æãã¾ãã
#ä»åã¯/home/cimadai/local/python/以ä¸ã«ã¤ã³ã¹ãã¼ã«ã
ã¾ãvirtual-pythonã®ã¤ã³ã¹ãã¼ã«
%mkdir ~/local/python %cd ~/local/src/ %wget http://peak.telecommunity.com/dist/virtual-python.py %python virtual-python.py --prefix=/home/cimadai/python
ç°å¢å¤æ°ã®ç·¨é ~/.cshrcãã¡ã¤ã«ãä¿®æ£
setenv PATH $HOME/local/python/bin setenv PYTHONPATH $HOME/local/python
exitã§ãã£ããSSHãæãã¦ãã°ã¤ã³ããªããã
virtual-pythonãå ¥ã£ãäºã確èª
%which python /home/cimadai/local/python/bin/python
ã¨ãªããã¨ã確èªã§ããã°ã³ã³ã¾ã§OKã
easy_installãã¤ã³ã¹ãã¼ã«
ããããªãpythonã許ãããã®ã¯(ry
ã¨ããããå®è¡ãã¦ã¿ãã
%cd ~/local/src/ %wget http://peak.telecommunity.com/dist/ez_setup.py %python ez_setup.py
ãã ãããªããã¨ã©ã¼ã ã£ã¦è¨ãããã
Downloading http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c8-py2.4.egg TEST FAILED: /home/cimadai/ does NOT support .pth files error: bad install directory or PYTHONPATH You are attempting to install a package to a directory that is not on PYTHONPATH and which Python does not read ".pth" files from. The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: /home/cimadai/ and your PYTHONPATH environment variable currently contains: '/home/cimadai/local/python' Here are some of your options for correcting the problem: * You can choose a different installation directory, i.e., one that is on PYTHONPATH or supports .pth files * You can add the installation directory to the PYTHONPATH environment variable. (It must then also be on PYTHONPATH whenever you run Python and want to use the package(s) you are installing.) * You can set up the installation directory to support ".pth" files by using one of the approaches described here: http://peak.telecommunity.com/EasyInstall.html#custom-installation-locations Please make the appropriate changes for your system and try again.
ã©ããã以ä¸ã®å 容ã®ãã¡ã¤ã«ãä½æããã¨ãããããã
[install] install_lib = $HOME/local/python/lib install_scripts = $HOME/local/python/bin
~/.pydistuils.cfg ã«ä¿åã
ããã«ç°å¢å¤æ°ã追å
~/.cshrc setenv PYTHONPATH $HOME/local/python:$HOME/local/python/lib
ã§ããªãã©ã¤
%python ez_setup.py
Downloading http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c8-py2.4.egg Creating /home/cimadai/local/python/lib/site.py Processing setuptools-0.6c8-py2.4.egg creating /home/cimadai/local/python/lib/setuptools-0.6c8-py2.4.egg Extracting setuptools-0.6c8-py2.4.egg to /home/cimadai/local/python/lib Adding setuptools 0.6c8 to easy-install.pth file Installing easy_install script to /home/cimadai/local/python/bin Installing easy_install-2.4 script to /home/cimadai/local/python/bin Installed /home/cimadai/local/python/lib/setuptools-0.6c8-py2.4.egg Processing dependencies for setuptools==0.6c8 Finished processing dependencies for setuptools==0.6c8
ãããæåããã£ã½ãã
ããã§ä»æ¥ããeasy_installãã¾ããã®ã¹ãããªpythonç°å¢â
ä»ååèã«ãããµã¤ã
-
- ã¦ãã¦ã©ã Pythonéçºç°å¢ãæ´ããã(http://labs.unoh.net/2007/04/python.html)
- Hirobeã®Hackå庫 ãããã¤ã³ã¿ã¼ãããã«Tracãæ§ç¯ãã(Trac0.11b1, Trac0.11rc1)(http://weekbuild.sakura.ne.jp/trac/wiki/TracDoc/SakuraInternetTrac0.11b1)