Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Help "Install" Module for Python using WGET

Tags:

python

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'
like image 289
Btibert3 Avatar asked Oct 12 '10 14:10

Btibert3


People also ask

How do I import a wget module into Python?

Open File Explorer and find the wget.exe file you downloaded, then copy and paste it to the C:\Windows\System32 directory to add wget.exe to the PATH environment variable.

How do I install a Python module?

The best and recommended way to install Python modules is to use pip, the Python package manager. Otherwise: Download get-pip.py from https://bootstrap.pypa.io/get-pip.py. Run python get-pip.py.


2 Answers

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

like image 90
Himanshu Avatar answered Oct 20 '22 18:10

Himanshu


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.

like image 34
Srikar Appalaraju Avatar answered Oct 20 '22 17:10

Srikar Appalaraju