Return-Path: Delivered-To: apmail-lucene-pylucene-dev-archive@minotaur.apache.org Received: (qmail 77537 invoked from network); 22 May 2010 17:18:01 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 May 2010 17:18:01 -0000 Received: (qmail 7196 invoked by uid 500); 22 May 2010 17:18:01 -0000 Delivered-To: apmail-lucene-pylucene-dev-archive@lucene.apache.org Received: (qmail 7121 invoked by uid 500); 22 May 2010 17:18:00 -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 7113 invoked by uid 99); 22 May 2010 17:18:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 May 2010 17:18:00 +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.194] (HELO mout.perfora.net) (74.208.4.194) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 May 2010 17:17:52 +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 0Lh78h-1NVYwo0VPj-00nh1q; Sat, 22 May 2010 13:17:30 -0400 Message-ID: <4BF811A6.70400@orcatec.com> Date: Sat, 22 May 2010 10:17:26 -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> <4BF703EF.7020405@orcatec.com> <4BF71733.4090905@orcatec.com> <1952280103-1274490013-cardhu_decombobulator_blackberry.rim.net-202714315-@bda2481.bisx.prod.on.blackberry> <4BF740C7.8090300@orcatec.com> <4BF764FC.7010406@orcatec.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1+E729LN+j0gOqIQl8h6ru/kdGsmwUxL4TOnbc fgrfjM4yQHP9D3/+YFEBaejbK7UDRej772LXEghxJ10ScTD3Ad ad3BdNiBgyg4equFExoRw== X-Virus-Checked: Checked by ClamAV on apache.org Thanks for your efforts Andi. I think that I figured out the problem: I looked at the directory pylucene-2.9.2-1/jcc. JCC.egg-info was owned by root. When I changed the owner and group for all files in jcc to herb it worked just fine. I think that I now know what happened. I used a previously used copy of the pylucene directory. When setup install wrote JCC.egg-info, among others into that directory, it wrote it as root because I used sudo python setup.py install. When I went back and untarred the tar file, all of the files were owned by herb, but JCC.egg-info was not there at all, it is added during install. I think that the problem is now solved. Short answer: when installing in a virtual environment, use a clean copy of the directories pulled from the tar file. Thanks so much for sticking with me through this and for all the other work you do on pylucene. Regards, Herb On 05/22/2010 12:46 AM, Andi Vajda wrote: > > On May 21, 2010, at 22:00, Herbert Roitblat wrote: > >> which python: >> /home/herb/src/venv/bin/python > > Ah ok. So the python you're running to build jcc is the correct one. > > Well, you've exhausted the things I could think of for your problem. I > recommend you now take your question to a forum that handles > virtualenv questions. They might be able to help you further. > > Andi.. > >> >> On 05/21/2010 09:31 PM, Andi Vajda wrote: >>> >>> On Fri, 21 May 2010, Herbert Roitblat wrote: >>> >>>> Andi, >>>> Thanks for taking so much time. Here are the exact commands and >>>> the exact responses. >>> >>> So I ask again: what is the result of the command below ? >>> >>> $ which python >>> >>> Andi.. >>> >>>> (venv)herb@Ubuntu2:~/src/venv/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:~/src/venv/pylucene-2.9.2-1/jcc$ >>>> >>>> (venv)herb@Ubuntu2:~/src/venv/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 >>>> (venv)herb@Ubuntu2:~/src/venv/pylucene-2.9.2-1/jcc$ >>>> >>>> >>>> Ubuntu 10.04, python 2.6.5 >>>> >>>> Thanks, >>>> Herb >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> On 05/21/2010 06:28 PM, Andi Vajda wrote: >>>>> >>>>> On Sat, 22 May 2010, Herbert Roitblat wrote: >>>>> >>>>>> (venv)herb@Ubuntu2:~/pylucene-2.9.2-1/jcc$ python setup.py >>>>>> build >>>>>> (venv)herb@Ubuntu2:~/pylucene-2.9.2-1/jcc$ python setup.py install >>>>> >>>>> ok, and what is the result of the command below ? >>>>> >>>>> (venv)herb@Ubuntu2:~/pylucene-2.9.2-1/jcc$ which python >>>>> >>>>> Andi.. >>>>> >>>>>> >>>>>> Thanks >>>>>> Sent from my BlackBerry wireless handheld. >>>>>> >>>>>> -----Original Message----- >>>>>> From: Andi Vajda >>>>>> Date: Fri, 21 May 2010 16:54:34 >>>>>> To: pylucene-dev@lucene.apache.org >>>>>> Subject: Re: pylucene in a virtual environment >>>>>> >>>>>> >>>>>> On May 21, 2010, at 16:28, Herbert Roitblat >>>>>> wrote: >>>>>> >>>>>>> I believe that it is /home/herb/src/venv/bin >>>>>> >>>>>> What is the exact command you type to build jcc ? to install jcc ? >>>>>> >>>>>> Andi.. >>>>>> >>>>>>> Thanks, >>>>>>> I have been using virtual environments for some time. Almost >>>>>>> always >>>>>>> the stuff just installs the way you say. That's why I'm puzzled >>>>>>> why >>>>>>> this is not working in the same way. >>>>>>> Thanks again for your help. >>>>>>> Herb >>>>>>> >>>>>>> >>>>>>> On 05/21/2010 04:17 PM, Andi Vajda wrote: >>>>>>>> >>>>>>>> On Fri, 21 May 2010, Herbert Roitblat wrote: >>>>>>>> >>>>>>>>> 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. >>>>>>>> >>>>>>>> I think we're talking past each other and getting off topic from >>>>>>>> this forum which is about PyLucene and JCC and not about >>>>>>>> virtualenv.py. >>>>>>>> >>>>>>>> Still, if you can answer the question below, maybe I can help you >>>>>>>> debug this: >>>>>>>> >>>>>>>> What is the full path of the python executable you're invoking to >>>>>>>> build >>>>>>>> jcc ? to install jcc ? >>>>>>>> >>>>>>>> Andi.. >>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> 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 >>>>>>>>> >>>>>> >>>>