Skip to content
This repository has been archived by the owner on Sep 14, 2018. It is now read-only.

Can IronPython be used with virtualenv? #1278

Open
klothe opened this issue Feb 9, 2016 · 3 comments
Open

Can IronPython be used with virtualenv? #1278

klothe opened this issue Feb 9, 2016 · 3 comments

Comments

@klothe
Copy link

klothe commented Feb 9, 2016

If so, is there any documentation on how to create a virtualenv for IronPython on Unix? Virtualenv doesn't seem to like when the Python interpreter is not itself an executable, but a command with arguments like "mono ipy64.exe".

If virtualenv doesn't work, what do people use as a workaround for creating isolated environments?

@jdhardy
Copy link
Member

jdhardy commented Feb 9, 2016

On Tue, Feb 9, 2016 at 9:31 AM, klothe [email protected] wrote:

If so, is there any documentation on how to create a virtualenv for
IronPython on Unix? Virtualenv doesn't seem to like when the Python
interpreter is not itself an executable, but a command with arguments like
"mono ipy64.exe".

If virtualenv doesn't work, what do people use as a workaround for
creating isolated environments?

virtualenv should work in Windows, but I've never tested it on not-Windows.
Jython has a similar issue and I'm pretty sure you can use it with
virtualenv on *nix machines, so it might be a matter of seeing how it is
handled and copying that (Jython might use a wrapper shell script, I'm not
sure, or it might have special handling in virtualenv).


Reply to this email directly or view it on GitHub
#1278.

@klothe
Copy link
Author

klothe commented Feb 9, 2016

Thanks. I made a wrapper shell script (just "mono ipy64.exe $@"), and virtualenv worked with that but got "ImportError: No module named fcntl".

Apparently the fcntl module doesn't exist in IronPython:

IronPython 2.7.5 (2.7.5.0) on Mono 4.0.30319.17020 (64-bit)
Type "help", "copyright", "credits" or "license" for more information.
>>> import fcntl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named fcntl

sys.path contains the Lib and DLLs directories, but there is no "fcntl" there. Maybe that's because fcntl is Unix-specific, but virtualenv shouldn't depend on a Unix-specific module if it's supposed to be cross-platform.

@klothe
Copy link
Author

klothe commented Feb 9, 2016

Actually, here's an open issue and PR in virtualenv which suggest that virtualenv doesn't work with IronPython:
pypa/virtualenv#159
pypa/virtualenv#628

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants