Return-Path: Delivered-To: apmail-lucene-pylucene-dev-archive@minotaur.apache.org Received: (qmail 44277 invoked from network); 21 May 2010 22:07:24 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 May 2010 22:07:24 -0000 Received: (qmail 50105 invoked by uid 500); 21 May 2010 22:07:24 -0000 Delivered-To: apmail-lucene-pylucene-dev-archive@lucene.apache.org Received: (qmail 50083 invoked by uid 500); 21 May 2010 22:07:24 -0000 Mailing-List: contact pylucene-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pylucene-dev@lucene.apache.org Delivered-To: mailing list pylucene-dev@lucene.apache.org Received: (qmail 50075 invoked by uid 99); 21 May 2010 22:07:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 May 2010 22:07:24 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [74.208.4.195] (HELO mout.perfora.net) (74.208.4.195) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 May 2010 22:07:16 +0000 Received: from [192.168.1.135] (cpe-75-84-68-253.socal.res.rr.com [75.84.68.253]) by mrelay.perfora.net (node=mrus2) with ESMTP (Nemesis) id 0MGAuN-1O0VvX48Xv-00EnO0; Fri, 21 May 2010 18:06:54 -0400 Message-ID: <4BF703EF.7020405@orcatec.com> Date: Fri, 21 May 2010 15:06:39 -0700 From: Herbert Roitblat User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 MIME-Version: 1.0 To: pylucene-dev@lucene.apache.org Subject: Re: pylucene in a virtual environment References: <1159474112.790412.1274465657888.JavaMail.open-xchange@oxusltgw10.schlund.de> <185218169.793783.1274473698356.JavaMail.open-xchange@oxusltgw10.schlund.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX19DaodYfvbaCabFwYqfPVdIGbMaHQmrFBE2sr4 75XXCHuDJ5ebKVy9z3TCrrfGXe0h5WEIzKhbekAh4l55owzZKm NB1wijqNGYdnPV4rAPwkg== X-Virus-Checked: Checked by ClamAV on apache.org Thanks, but unfortunately, I don't know what is right either. This is the first time I am trying to set this up in a virtual environment. All I can see is that it's claiming that I don't have write permission Using the virtual environment, I should not need to invoke sudo to install it because it should install in my virtual environment, not in /usr. The permissions error suggests that it is installing it in the global location, rather than the virtual location. I am using Ubuntu 10.04 with Python 2.6.2. My virtual environment is located at ~/herb/venv. I'm sorry to hear that when you run it from your virtual environment, it just works. Clearly I'm doing something wrong. I'll try to lay out what I did. The pylucene directory was mounted under my home directory: ~/pylucene-2.9.2-1/jcc. I did try moving it to under my virtual environment directory, but that made no difference. I changed jcc/setup.py to point to the java jvm, which is in /usr/lib. JDK = { 'darwin': '/System/Library/Frameworks/JavaVM.framework/Versions/Current', 'ipod': '/usr/include/gcc', 'linux2': '/usr/lib/jvm/java-6-sun-1.6.0.20/', 'sunos5': '/usr/jdk/instances/jdk1.6.0', 'win32': 'o:/Java/jdk1.6.0_02', } --- Then I ran setup.py build and setup.py install. That'w when I got the message below: error: JCC.egg-info/PKG-INFO: Permission denied I think that it should go somewhere under my virtual environment directory. I guess under lib? I hope that you have some suggestions or can think of where the location for JCC.egg-info/PKG-INFO is coded. Thanks for your help. Herb On 05/21/2010 02:10 PM, Andi Vajda wrote: > > On Fri, 21 May 2010, herb@orcatec.com wrote: > >> Thanks, Andi. >> Apparently installing this stuff in the virtual environment is a bit >> more >> difficult than installing regular packages. >> > ?? It looks like I am trying to install JCC.egg-info/PKG-INFO in the > wrong place. ?? How do I tell it the right place? I'm on Ubuntu 10.04, > by the way. > > I don't know what's right or wrong for your setup ? Can you be more > specific ? When I build JCC by invoking my virtualenv's python > executable it does the right thing for mine. > > Andi.. > >> Thanks, >> Herb >> >> > ?? ?? (venv)herb@Ubuntu2:~/pylucene-2.9.2-1/jcc$ python setup.py build >> running build >> running build_py >> copying jcc/config.py -> build/lib.linux-x86_64-2.6/jcc >> running build_ext >> (venv)herb@Ubuntu2:~/pylucene-2.9.2-1/jcc$ python setup.py install >> running install >> running bdist_egg >> running egg_info >> writing JCC.egg-info/PKG-INFO >> error: JCC.egg-info/PKG-INFO: Permission denied >> >> > ?? ?? ?? ?? ?? >> >> >> >> > ?? >> On May 21, 2010 at 6:37 PM Andi Vajda wrote: >> >>> >>> On May 21, 2010, at 11:14, "herb@orcatec.com" wrote: >>> >>>> I set up pylucene and installed it in the standard fashion. That > ??>> seems to have >>>> worked. Now I am building a virtual environment to do some > ??>> development in. >>>> I ran make from the virtualenv and it worked, but when I try to make > ??>> install, it >>>> tries to put it in /usr/local/lib/python2.6/dist-packages/ >>>> >>>> I saw a suggestion from Andi about using --home, but I'm not sure > ??>> where to put >>>> it. Is that what needs to be done? Do I have to build jcc from the > ??>> virtualenv >>>> as well? In other words, where do I start when putting things in my >>>> virtualenv? Can I copy from dist-packages? >>> >>> I use virtualenv a lot as I have to have a bunch of branches/configs > ??> available on the same machine. >>> >>> I always use the python executable that's installed in the virtualenv. >>> You need to make sure that's also the case in the PyLucene Makefile by > ??> editing the section corresponding to your platform to make it so > ??> (PREFIX_PYTHON). >>> >>> I also always build jcc into the virtualenv first although that > ??> shouldn't strictly be necessary since virtualenv normally inherits > ??> modules from its origin. >>> >>> Andi.. >>> >>>> >>>> Thanks, >>>> Herb