[IronPython] Compiling so that IronPython libraries are recognized?

Funke, Matt Matt.funke at vishaypg.com
Fri Jul 9 19:50:03 CEST 2010


IRONPYTHONPATH is not even an environment variable.

README.txt is the only file in %PROGRAMFILES%\IronPython 2.6 for .NET 4.0\Lib\site-packages.

Changing line 242 of site.py in C:\Users\me\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\IronPython Tools for Visual Studio\0.2\Lib did not make the error go away.

I'll see if I can find anything useful in the call stack.  Thank you for your reply and your time.

-- Best Regards,
    Matt Funke

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland
Sent: Friday, July 09, 2010 1:25 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Compiling so that IronPython libraries are recognized?

I can think of 1 of 2 things causing this:

1.       IRONPYTHONPATH is set somewhere and causing us to search in directories we shouldn't be

a.       You can just clear this env var if that's the problem

2.       There's something in site-packages which is causing this to be messed up.

a.       You can look in %PROGRAMFILES%\IronPython 2.6 for .NET 4.0\Lib\site-packages and see if there's any unwanted goo here.  By default I think there's just a README.txt and pkg_resources.py.

b.      You can also look in %APPDATA%\Python - I think this may still not be properly versioned based upon Python runtime so it's possible something from CPython could interfere.  You could modify line 242 of site.py to be "IronPython" instead of "Python"


If that doesn't help it might be useful to look through that call stack and see where the directories are being pulled from.

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Funke, Matt
Sent: Friday, July 09, 2010 9:06 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Compiling so that IronPython libraries are recognized?

I'm beginning to think that something is seriously wrong with my installation of IronPython.

When I enter IronPython from the command line (by typing "ipy -D -X:ColorfulConsole -X:TabCompletion"), and type in "help('modules')" to start my investigation of the dbapi implementation, I get this error:

Traceback (most recent call last):
  File "<stdin>", line unknown, in <module>
  File "C:\Program Files\IronPython 2.6 for .NET 4.0\Lib\site.py", line 429, in __call__
  File "C:\Program Files\IronPython 2.6 for .NET 4.0\Lib\pydoc.py", line 1719, in __call__
  File "C:\Program Files\IronPython 2.6 for .NET 4.0\Lib\pydoc.py", line 1754, in help
  File "C:\Program Files\IronPython 2.6 for .NET 4.0\Lib\pydoc.py", line 1879, in listmodules
  File "C:\Program Files\IronPython 2.6 for .NET 4.0\Lib\pydoc.py", line 1930, in run
  File "C:\Program Files\IronPython 2.6 for .NET 4.0\Lib\pkgutil.py", line 105, in walk_packages
  File "C:\Program Files\IronPython 2.6 for .NET 4.0\Lib\pkgutil.py", line 147, in iter_modules
  File "C:\Program Files\IronPython 2.6 for .NET 4.0\Lib\pkgutil.py", line 211, in iter_modules
WindowsError: [Errno 13] [Errno 5] Access to the path 'C:\Documents and Settings\' is denied.

The path 'C:\Documents and Settings\' does not exist in a Windows 7 default installation.  What do I need to do to fix IronPython?

Thanks again for your time.

-- Best Regards,
    Matt Funke

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Vernon Cole
Sent: Friday, July 09, 2010 11:44 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Compiling so that IronPython libraries are recognized?

There IS a working dbapi 2.0 implementation for Iron Python. see http://sourceforge.net/projects/adodbapi

It uses Microsoft ADO, so should be able to connect with PostgreSQL or almost any other tabular data source. I have not yet tested it with Postgres. That's the next thing on my to-do list. (I have a server running on my handy Ubuntu box, but can't seem to get it to connect. Why is there never enough time?)  It is known to work with MicroSoft SQL, ACCESS, MySQL, and IBM AS400 sql.

I also have not yet written a distutils setup for it for IronPython -- you will have to unzip and copy to do the install the hard way. (Another to-do list item.)

You will either need to find an ADO provider for Postgres, or use an ODBC driver and a different connection string. (I use an ODBC connection for the MySQL sample in the \test folder.) Let me know how it works for you.
--
Vernon Cole
On Fri, Jul 9, 2010 at 8:49 AM, Michael Foord <fuzzyman at voidspace.org.uk<mailto:fuzzyman at voidspace.org.uk>> wrote:
On 09/07/2010 14:50, Funke, Matt wrote:
I'm extremely new to compiling things in anything approaching a pythonic way, so my apologies in advance for what's probably a very simplistic question.

I've downloaded the source for psycopg2-2.2.1.  The documentation recommends using the standard "python setup.py build" and "python setup.py install".

So I tried to run "ipy setup.py build" to incorporate these libraries into IronPython.

I get this error:

Traceback (most recent call last):
  File "setup.py", line 50, in<module>
ImportError: No module named subprocess



subprocess relies on modules like signal that aren't available in IronPython 2.6.1.

There is a partial implementation of subprocess by Jeff Hardy floating around that you could try. In general the IronPython support for distutils is "minimal", so I still wouldn't expect normal module installation to work.

All the best,

Michael

I can verify that subprocess.py is in C:\Users\me\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\IronPython Tools for Visual Studio\0.2\Lib.  Do I need to add this directory to an environment variable (like PATH), or is there some other way I can notify IronPython about where to look for library files?

Thanks for your time.

 -- Best Regards,
    Matt Funke
_______________________________________________
Users mailing list
Users at lists.ironpython.com<mailto:Users at lists.ironpython.com>
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog

READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.



_______________________________________________
Users mailing list
Users at lists.ironpython.com<mailto:Users at lists.ironpython.com>
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100709/ca3b481a/attachment.html>


More information about the Ironpython-users mailing list