Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
problem creating virtualenv from another virtualenv
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Chris Withers  
View profile  
 More options Jul 4 2012, 5:40 am
From: Chris Withers <ch...@simplistix.co.uk>
Date: Wed, 04 Jul 2012 10:40:29 +0100
Local: Wed, Jul 4 2012 5:40 am
Subject: problem creating virtualenv from another virtualenv
Hi All,

It looks like the latest virtualenvs have introduced a bug creating
virtualenvs from other virtualenvs. Depending on the ownership, if
you're lucky, you'll get a permission denied error if you're lucky,
otherwise your original virtualenv will have its distutils/__init__.py
molested :-S

Steps to reproduce:

buzzkill:virtualenvs chris$ python virtualenv.py --version
1.7
buzzkill:virtualenvs chris$ python ~/LocalGIT/virtualenv/virtualenv.py
--version
1.7.2

buzzkill:virtualenvs chris$ python2.5 virtualenv.py py2.5
New python executable in py2.5/bin/python2.5
Also creating executable in py2.5/bin/python
Installing setuptools............................done.
Installing pip.....................done.

buzzkill:virtualenvs chris$ sudo -u root chown -R root py25

buzzkill:virtualenvs chris$ ./py25/bin/python2.5
~/LocalGIT/virtualenv/virtualenv.py --distribute test_2.5
Using real prefix '/System/Library/Frameworks/Python.framework/Versions/2.5'
New python executable in test_2.5/bin/python2.5
Also creating executable in test_2.5/bin/python
Overwriting test_2.5/lib/python2.5/distutils/__init__.py with new content
Traceback (most recent call last):
   File "/Users/chris/LocalGIT/virtualenv/virtualenv.py", line 2429, in
<module>
     main()
   File "/Users/chris/LocalGIT/virtualenv/virtualenv.py", line 942, in main
     never_download=options.never_download)
   File "/Users/chris/LocalGIT/virtualenv/virtualenv.py", line 1045, in
create_environment
     install_distutils(home_dir)
   File "/Users/chris/LocalGIT/virtualenv/virtualenv.py", line 1502, in
install_distutils
     writefile(os.path.join(distutils_path, '__init__.py'), DISTUTILS_INIT)
   File "/Users/chris/LocalGIT/virtualenv/virtualenv.py", line 454, in
writefile
     f = open(dest, 'wb')
IOError: [Errno 13] Permission denied:
'test_2.5/lib/python2.5/distutils/__init__.py'

This used to work with virtualenv 1.7:

buzzkill:virtualenvs chris$ ./py25/bin/python2.5 virtualenv.py
--distribute test_2.5
Using real prefix '/System/Library/Frameworks/Python.framework/Versions/2.5'
New python executable in test_2.5/bin/python2.5
Also creating executable in test_2.5/bin/python
Installing
distribute................................................................. ........................................................................... .................................................done.
Installing pip.....................done.

I'll log a bug for this, but does anyone have a workaround in the meantime?

cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Withers  
View profile  
 More options Jul 4 2012, 6:22 am
From: Chris Withers <ch...@simplistix.co.uk>
Date: Wed, 04 Jul 2012 11:22:01 +0100
Local: Wed, Jul 4 2012 6:22 am
Subject: Re: [venv] problem creating virtualenv from another virtualenv
On 04/07/2012 10:40, Chris Withers wrote:

> It looks like the latest virtualenvs have introduced a bug creating
> virtualenvs from other virtualenvs. Depending on the ownership, if
> you're lucky, you'll get a permission denied error if you're lucky,
> otherwise your original virtualenv will have its distutils/__init__.py
> molested :-S

> Steps to reproduce:
> buzzkill:virtualenvs chris$ ./py25/bin/python2.5
<snip>
> f = open(dest, 'wb')
> IOError: [Errno 13] Permission denied:
> 'test_2.5/lib/python2.5/distutils/__init__.py'

Okay, I solved this by recreating the source virtualenvs with virtualenv
1.7.2.

Not sure why that helped, but it has...

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »