ponty / PyVirtualDisplay

Python wrapper for Xvfb, Xephyr and Xvnc
BSD 2-Clause "Simplified" License
709 stars 78 forks source link

import error on fresh install #4

Closed anonymous83819 closed 12 years ago

anonymous83819 commented 13 years ago

line 2 of abstractdisplay.py should be "import os.path as path" instead of "import path from path". I fixed my copy locally and it is working fine, but I just wanted to contribute the fix upstream so all can benefit.

ponty commented 13 years ago

I could not reproduce the import error on fresh install.

My test:

xubuntu 10.10 live CD in VirtualBox

sudo apt-get install python-setuptools sudo apt-get install xvfb sudo apt-get install xserver-xephyr sudo apt-get install tightvncserver sudo easy_install pyvirtualdisplay

python -m pyvirtualdisplay.examples.lowres -> OK: abiword is displayed inside xephyr

kisoku commented 12 years ago

I could reproduce this on ubuntu lucid 10.04

ponty commented 12 years ago

I did the same test again, no error:

ubuntu 10.04.3 live CD in VirtualBox (ubuntu-10.04.3-desktop-i386.iso)

commands inside virtualbox

enable 'universe' in repositories

terminal:

sudo apt-get update
sudo apt-get install python-setuptools
sudo apt-get install xvfb
sudo apt-get install xserver-xephyr
sudo apt-get install abiword
sudo easy_install pyvirtualdisplay

python -m pyvirtualdisplay.examples.lowres

-> OK: abiword is displayed inside xephyr

aculich commented 12 years ago

What package is the path module a part of? I can't seem to find it anywhere on my debian system with all the basic python debian packages installed. The only reference I've been able to find to it is here:

http://wiki.python.org/moin/PathModule

And then after further digging I found that it is part of the spyderlib package as one of their external utilities, so on my system I can do:

from spyderlib.utils.external.path import path

But this is not a standard python package as far as I can tell. Where is it on your Ubuntu systems?

kisoku commented 12 years ago

I believe the implementation of path that is being used here is path.py by Michael Gusarov. You can find it on PYPI and Github

http://pypi.python.org/pypi/path.py/2.2.2 https://github.com/dottedmag/path.py

The path.py module is not packaged on Ubuntu Lucid. I wound up making a custom ubuntu package for this at work. Unfortunately I cannot share this package with you, however it is reasonably trivial to make your own package from the pypi distribution using the py2dsc tool from the python-stdeb package.

aculich commented 12 years ago

Thanks! That would be good info to add to the install instructions in the documentation.

ponty commented 12 years ago
  1. It may be easy to find the problem if you attach the standard bug report informations:
    • system info
    • how you tried to install
    • log
  2. I tested the documented installation process on 2 systems without error. You can reproduce it using my instructions in previous comments.
  3. path.py dependency is a python package not a debian package. Dependencies are defined in pavement.py as install_requires. They can be checked in pavement.py or online on PyPM (http://code.activestate.com/pypm/pyvirtualdisplay/). All dependencies are normal python packages, but they should be installed by easy_install automatically. These are all standard methods.

To install path.py separately: easy_install path.py (this is not needed for PyVirtualDisplay installation!)

aculich commented 12 years ago

Ah, yes, you're right.... I see the dependency listed in pavement.py now. The problem is that because I checked out from github I did not intend to install the package with easy_install since I did not actually want to install it, but rather work on the checked out code. Seems easy_install needs some options like cabal has for --only-deps and --upgrade-deps for this kind of case.

Thanks for the help.