Skip to content

Instantly share code, notes, and snippets.

@lehrblogger
Created August 14, 2012 06:47
Show Gist options
  • Save lehrblogger/3346994 to your computer and use it in GitHub Desktop.
Save lehrblogger/3346994 to your computer and use it in GitHub Desktop.
virtualenv issues with python-dev in shared Vagrant folder
Last login: Tue Aug 14 02:41:31 on ttys004
~/Desktop/vagrant_test 3949$ ls
~/Desktop/vagrant_test 3950$ vagrant box add base http://files.vagrantup.com/lucid32.box
[vagrant] Downloading with Vagrant::Downloaders::HTTP...
[vagrant] Downloading box: http://files.vagrantup.com/lucid32.box
[vagrant] Extracting box...
[vagrant] Verifying box...
[vagrant] Cleaning up downloaded box...
~/Desktop/vagrant_test 3951$ vagrant init
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
~/Desktop/vagrant_test 3952$ vagrant up
[default] Importing base box 'base'...
[default] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.
Guest Additions Version: 4.1.16
VirtualBox Version: 4.1.18
[default] Matching MAC address for NAT networking...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Mounting shared folders...
[default] -- v-root: /vagrant
~/Desktop/vagrant_test 3953$ vagrant ssh
Linux lucid32 2.6.32-38-generic #83-Ubuntu SMP Wed Jan 4 11:13:04 UTC 2012 i686 GNU/Linux
Ubuntu 10.04.4 LTS
Welcome to Ubuntu!
* Documentation: https://help.ubuntu.com/
Welcome to your Vagrant-built virtual machine.
Last login: Thu Jun 7 01:56:53 2012 from 10.0.2.2
vagrant@lucid32:~$ sudo apt-get install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
python-pkg-resources python-setuptools
Suggested packages:
python-distribute python-distribute-doc
The following NEW packages will be installed:
python-pip python-pkg-resources python-setuptools
0 upgraded, 3 newly installed, 0 to remove and 23 not upgraded.
Need to get 327kB of archives.
After this operation, 1,405kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://us.archive.ubuntu.com/ubuntu/ lucid/main python-pkg-resources 0.6.10-4ubuntu1 [65.0kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ lucid/main python-setuptools 0.6.10-4ubuntu1 [213kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ lucid-updates/universe python-pip 0.3.1-1ubuntu2.1 [49.8kB]
Fetched 327kB in 0s (1,250kB/s)
Selecting previously deselected package python-pkg-resources.
(Reading database ... 26974 files and directories currently installed.)
Unpacking python-pkg-resources (from .../python-pkg-resources_0.6.10-4ubuntu1_all.deb) ...
Selecting previously deselected package python-setuptools.
Unpacking python-setuptools (from .../python-setuptools_0.6.10-4ubuntu1_all.deb) ...
Selecting previously deselected package python-pip.
Unpacking python-pip (from .../python-pip_0.3.1-1ubuntu2.1_all.deb) ...
Processing triggers for man-db ...
Setting up python-pkg-resources (0.6.10-4ubuntu1) ...
Processing triggers for python-central ...
Setting up python-setuptools (0.6.10-4ubuntu1) ...
Processing triggers for python-central ...
Setting up python-pip (0.3.1-1ubuntu2.1) ...
Processing triggers for python-central ...
vagrant@lucid32:~$ sudo pip install virtualenv
Downloading/unpacking virtualenv
Downloading virtualenv-1.7.2.tar.gz (2.2Mb): 2.2Mb downloaded
Running setup.py egg_info for package virtualenv
warning: no previously-included files matching '*' found under directory 'docs/_templates'
warning: no previously-included files matching '*' found under directory 'docs/_build'
Installing collected packages: virtualenv
Running setup.py install for virtualenv
warning: no previously-included files matching '*' found under directory 'docs/_templates'
warning: no previously-included files matching '*' found under directory 'docs/_build'
Installing virtualenv script to /usr/local/bin
Installing virtualenv-2.6 script to /usr/local/bin
Successfully installed virtualenv
vagrant@lucid32:~$ cd /vagrant/
vagrant@lucid32:/vagrant$ virtualenv test0
New python executable in test0/bin/python
Installing setuptools............done.
Installing pip...............done.
vagrant@lucid32:/vagrant$ sudo apt-get install python-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libpython2.6 python2.6-dev
The following NEW packages will be installed:
libpython2.6 python-dev python2.6-dev
0 upgraded, 3 newly installed, 0 to remove and 23 not upgraded.
Need to get 5,386kB of archives.
After this operation, 13.9MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://us.archive.ubuntu.com/ubuntu/ lucid/main libpython2.6 2.6.5-1ubuntu6 [986kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ lucid/main python2.6-dev 2.6.5-1ubuntu6 [4,399kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ lucid/main python-dev 2.6.5-0ubuntu1 [970B]
Fetched 5,386kB in 1s (3,138kB/s)
Selecting previously deselected package libpython2.6.
(Reading database ... 27114 files and directories currently installed.)
Unpacking libpython2.6 (from .../libpython2.6_2.6.5-1ubuntu6_i386.deb) ...
Selecting previously deselected package python2.6-dev.
Unpacking python2.6-dev (from .../python2.6-dev_2.6.5-1ubuntu6_i386.deb) ...
Selecting previously deselected package python-dev.
Unpacking python-dev (from .../python-dev_2.6.5-0ubuntu1_all.deb) ...
Setting up libpython2.6 (2.6.5-1ubuntu6) ...
Setting up python2.6-dev (2.6.5-1ubuntu6) ...
Setting up python-dev (2.6.5-0ubuntu1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
vagrant@lucid32:/vagrant$ virtualenv test1
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 9, in <module>
load_entry_point('virtualenv==1.7.2', 'console_scripts', 'virtualenv')()
File "/usr/local/lib/python2.6/dist-packages/virtualenv.py", line 942, in main
never_download=options.never_download)
File "/usr/local/lib/python2.6/dist-packages/virtualenv.py", line 1043, in create_environment
site_packages=site_packages, clear=clear))
File "/usr/local/lib/python2.6/dist-packages/virtualenv.py", line 1186, in install_python
copyfile(join(stdlib_dir, fn), join(lib_dir, fn))
File "/usr/local/lib/python2.6/dist-packages/virtualenv.py", line 433, in copyfile
copyfileordir(src, dest)
File "/usr/local/lib/python2.6/dist-packages/virtualenv.py", line 408, in copyfileordir
shutil.copytree(src, dest, True)
File "/usr/lib/python2.6/shutil.py", line 177, in copytree
raise Error, errors
shutil.Error: [('/usr/lib/python2.6/config/libpython2.6.so', 'test1/lib/python2.6/config/libpython2.6.so', '[Errno 30] Read-only file system')]
vagrant@lucid32:/vagrant$ history
1 sudo apt-get install python-pip
2 sudo pip install virtualenv
3 cd /vagrant/
4 virtualenv test0
5 sudo apt-get install python-dev
6 virtualenv test1
7 history
vagrant@lucid32:/vagrant$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment