tags:

views:

55

answers:

3

I am trying to setup this python library and am having a very hard time. I suspect it is because I am a hobby programmer, but I have successfully installed programs in the past using the command line. I am using Windows and Python 2.6.

The help that is shown below is taken from the website.

wget http://pypi.python.org/packages/source/y/yql/yql-0.2.tar.gz
tar -xzf yql-0.2.tar.gz
cd yql-0.2
python setup.py install

In doing a number of Google searches, it seems that this is for Unix/Mac commands. My previous process has not worked, so I am looking for all of the help I can get.

Many thanks in advance!

  • Brock

Here is the error:

>>> import yql
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "c:\python25\lib\site-packages\yql-0.6-py2.5.egg\yql\__init__.py", line 201, in <module>
    class Public(object):
  File "c:\python25\lib\site-packages\yql-0.6-py2.5.egg\yql\__init__.py", line 229, in Public
    @scheme.setter
AttributeError: 'property' object has no attribute 'setter'
+1  A: 

What's the error message? Also what OS are you using? The install instructions seem fine.

In Debian & in most Unix Systems you could also these -

  1. sudo pip install <module_name> to install any module.
  2. or sudo easy_install <module_name>
  3. or sudo apt-get install <module_name>
  4. or you could do what you mentioned in the question. Should work fine.

Maybe you don't have root access. Package installation needs that. Post more info for more constructive comments. All the best.

MovieYoda
I am on Windows.
Btibert3
+2  A: 

Those are definately Unix/Linux commands to install python module. The installation in windows is pretty much similar. Follow the instructions given below

  1. Download the library from the website.
  2. Extract it using Winzip or WinRAR.
  3. It will create a directory with name like foo-0.2. The directory should contain a script named setup.py
  4. Now open the command prompt and cd to that directory
  5. At command prompt type following python setup.py install

Also check the following link for more detailed instructions

http://docs.python.org/release/2.6/install/index.html

Himanshu
Good instructions. I don't think winzip can open a .tar.gz archive though. Use 7zip for a free software archiver that can extract files from tar.gz archives (http://www.7-zip.org/).
Barthelemy
Thanks for getting back to me. I did this exactly. I dont believe I received any errors when I ran this process. I modified the question above so you can see the error I am getting when I simply try to import yql. Any help appreciated.
Btibert3
Are all the dependant modules already installed? Check https://launchpad.net/python-yql, it lists all the module on which yql is dependent upon. Install any missing ones and then try again
Himanshu
I didn't think of that, but it solved it for one machine anyway. Thanks!
Btibert3
Gald to be helpful.
Himanshu
+1  A: 

If you install setuptools first (see setuptools on pypi) and add C:\Python26\Scripts to your PATH variable you can run the following:

easy_install yql-0.2.tar.gz

after wgetting the archive.

Or even easier, without wgetting the archive, simply run:

easy_install yql

And it'll download and install the latest version of yql with all the dependencies.

Kevin Thiart
Also, if you're running Vista or Win7 make sure you open the command prompt as Administrator.
Kevin Thiart
I ran this on my machine at work (XP), and the easy_install appeared to work. When I ran the import yql, I got a error message on something httplib2 (or something like that)
Btibert3