Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Python on Windows

Reply
Thread Tools

Re: Python on Windows

 
 
Tim Golden
Guest
Posts: n/a
 
      10-19-2012
On 19/10/2012 14:24, graham wrote:
> Python was installed in the subdirectory C:\Python27 with the file
> feedparser.py residing in C:\Python27\Lib\email.
>
> Setting the Windows environment variable (which did not previously
> exist) to C:\Python27\Lib\email allowed me to import feedparser
> successfully.


As an aside, this is not the best use of the PYTHONPATH
variable. (I would argue that, on Windows at least, there's very little
need for the env var).

In general, you'll want to be using a mechanism such as pip:

http://pypi.python.org/pypi/pip

which will look things up on PyPI so you can just do "pip install
newmodule". This will install into c:\python27\lib\site-packages. The
same for a module you install "manually" (ie python setup.py install) or
via an .exe or an .msi from PyPI or elsewhere.

There are other possibilities: .pth files, the PYTHONPATH env var,
virtualenv, user-install directories which you can read about, but in
general, just let the standard mechanisms install into
c:\python27\lib\site-packages (which is automatically on sys.path) and
go from there.

TJG
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
!Windows Live Mail replace Outlook Express on Windows XP and Windows Mail on Vista... Max Burke NZ Computing 8 05-18-2007 12:10 AM
troubles building python 2.5 on Windows XP x64 Windows Server 2003 sp1 Platform SDK bhochstetler@gmail.com Python 8 04-11-2007 10:45 PM
Windows installer, different versions of Python on Windows Max M Python 1 10-10-2005 01:26 PM
compiling mysql-python for python 2.3 on windows Achim Domma Python 0 07-19-2003 08:29 AM



Advertisments