ข้ามไปที่เนื้อหาหลัก

บทความ

กำลังแสดงโพสต์ที่มีป้ายกำกับ python

[SOLVED] python easy_install problem on ubuntu

dsin@dsin-laptop:$ sudo easy_install netifaces Traceback (most recent call last): File "/usr/bin/easy_install", line 5, in from pkg_resources import load_entry_point File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 2562, in working_set.require(__requires__) File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 626, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 524, in resolve raise DistributionNotFound(req) # XXX put more info here pkg_resources.DistributionNotFound: setuptools==0.6c8 just install "python-setuptools" ref : mobileread.com

[ python ] how to install python eggs

ไปเอาชื่อ package name จาก cheese shop แล้ว ทำตามนี้ $sudo apt-get install python-setuptools $ sudo easy_install packagename เสร็จแล้ว มันจะไปอยู่ที่ sys.path ( เช่น /usr/lib/python2.5/site-packages/.. ) วิธีดู path ทำดังนี้ >>> import sys >>> sys.path More info : easy install

[ Plone ] วิธีลง Add-on Products โดยใช้ egg ( how to install Add-on Products )

1. หาชื่อ plugin ที่ต้องการโหลดจากใน cheeseshop เช่น Products.PloneFormGen 2. แก้ buildout.cfg เพิ่มชื่อเข้าไป [buildout] ... eggs = elementtree Products.PloneFormGen ข้อควรระวัง elementtree กับ Products.PloneFormGen เว้นย่อหน้าให้ดีๆน้ะจ้ะ ไม่งั้นจะรันไม่ผ่าน 3. $ ./bin/buildout มันจะลาก plugin ที่ต้องการ รวมทั้ง dependencies ที่เกี่ยวข้องมาลงให้เอง ( cool ! ) 4. จากนั้น restart zope ซะ 5. มันจะไปอยู่ที่ site setup Add on Products มาแว้วววว ปล. ถ้าต้องการเพิ่ม site ที่ให้ plone มันลาก plugin มาลง เพิ่มเข้าไปได้ที่ find-links ใน buildout.cfg นั่นแหละ find-links = http://dist.plone.org http://download.zope.org/ppix/ http://download.zope.org/distribution/ http://effbot.org/downloads ดูวิธีลงเพิ่มเพิ่มเติมที่ : plone

Using Eclipse IDE to run python ( by pydev plugin )

1. Help > Software Update 2. click tab 'available software' 3. click 'Add Site' 4. http://pydev.sourceforge.net/updates/ 1. Windows > Preference 2. Pydev > Interpreter - Python 3. /usr/bin/python see other eclipse topic .