Win32 Support

View: New views
5 Messages — Rating Filter:   Alert me  

Win32 Support

by Michael Pearce :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm having problems installing the win32com functions for my TG2 application. When I try to run the binary (pywin32) from within the virtual environment (tg2env) it seems to add the module to the python26 site-packages directory, and not the virtual environment directory. As a result, I'm unable see the win32com functions from my turbogears application. Is there some way to easy_install pywin32 instead of running the binary?

Rgds,
Michael


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to turbogears@...
To unsubscribe from this group, send email to turbogears+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Win32 Support

by Diez B. Roggisch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Michael Pearce schrieb:
> I'm having problems installing the win32com functions for my TG2
> application. When I try to run the binary (pywin32) from within the
> virtual environment (tg2env) it seems to add the module to the python26
> site-packages directory, and not the virtual environment directory. As a
> result, I'm unable see the win32com functions from my turbogears
> application. Is there some way to easy_install pywin32 instead of
> running the binary?

This is a problem of the suggestion to use --no-site-packages. I never
understood why it's given in the first place.

If you create the VE without that option, you can import win32 without a
hitch.

Of course, you need to make sure that none of the TG2-packages and it's
dependencies is already in the system python's path.

Diez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to turbogears@...
To unsubscribe from this group, send email to turbogears+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Win32 Support

by Christopher Arndt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Diez B. Roggisch wrote:
> This is a problem of the suggestion to use --no-site-packages.

It's not a problem, it's exactly the purpose of this option: hide
modules/packages installed in the system-wide site-packages directory
from the python path.

 > I never understood why it's given in the first place.

Because nowadays many Linux distros come with some of TG's dependencies
installed as system packages, but with too old versions. easy_install
and friends do not always update them reliably when you install TG.

If you use the --no-site-packages option, up-to-date versions of these
packages will be installed in the virtualenv no matter what.

 > Of course, you need to make sure that none of the TG2-packages and
 > it's dependencies is already in the system python's path.

There you have it.


Chris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to turbogears@...
To unsubscribe from this group, send email to turbogears+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Win32 Support

by Kevin Horn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Nov 10, 2009 at 8:44 AM, Christopher Arndt <chris.arndt@...> wrote:

Diez B. Roggisch wrote:
> This is a problem of the suggestion to use --no-site-packages.

It's not a problem, it's exactly the purpose of this option: hide
modules/packages installed in the system-wide site-packages directory
from the python path.

 > I never understood why it's given in the first place.

Because nowadays many Linux distros come with some of TG's dependencies
installed as system packages, but with too old versions. easy_install
and friends do not always update them reliably when you install TG.

If you use the --no-site-packages option, up-to-date versions of these
packages will be installed in the virtualenv no matter what.

 > Of course, you need to make sure that none of the TG2-packages and
 > it's dependencies is already in the system python's path.

There you have it.


Chris


See this thread: http://groups.google.com/group/turbogears-trunk/browse_thread/thread/05f53ffc45e5ba3b/7f16e44506fc2a4f?#7f16e44506fc2a4f

basically use easy_install -Z pywin32.exe

Kevin Horn

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to turbogears@...
To unsubscribe from this group, send email to turbogears+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Win32 Support

by Diez B. Roggisch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Christopher Arndt schrieb:

> Diez B. Roggisch wrote:
>> This is a problem of the suggestion to use --no-site-packages.
>
> It's not a problem, it's exactly the purpose of this option: hide
> modules/packages installed in the system-wide site-packages directory
> from the python path.
>
>  > I never understood why it's given in the first place.
>
> Because nowadays many Linux distros come with some of TG's dependencies
> installed as system packages, but with too old versions. easy_install
> and friends do not always update them reliably when you install TG.

True. I should have worded that differently: the instructions simply
mention it, without explaining the Consequences.

  http://turbogears.org/2.0/docs/main/DownloadInstall.html

There is some discussion on the bottom about this - but who's reading
that, especially if everything is working?

Diez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to turbogears@...
To unsubscribe from this group, send email to turbogears+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---