#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Location
    North West England
    Posts
    10
    Rep Power
    0

    Question Using virtualenv


    Hi all,

    So far I've been testing my python modules using globally-installed python versions, which I've now decided is annoying.

    I've started using virtualenv and specifying which python interpreter upon virtualenv creation.

    However, what I've noticed is that when I install one of my modules from pypi (module is 'surrealism') globally or locally, the included sqlite3 DB also gets installed. However, when using virtualenv and pip, the database is missing and isn't downloaded?

    Is there anything specific I have to do to include this in the virtualenv?

    Many thanks in advance,
    Morrolan
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Location
    North West England
    Posts
    10
    Rep Power
    0
    Actually, strange update - surrealism.py ends up in virtualenvs/surrealism27/lib/python2.7/site-packages where surrealism.sqlite ends up in the root of the virtualenv directory - in this case, virtualenvs/surrealism27.

    In surrealism.py, I declare a sqlite3 connection to the DB using:
    Code:
    CONN = sqlite3.connect('surrealism.sqlite')
    I think that may have something to do with it, rather than explicitly declaring current working directory/home of surrealism.py.

    Any ideas?

    If anyone is willing, I am willing to collaborate via cloud9 (c9.io) wher we can chat and edit the code together in realtime?

IMN logo majestic logo threadwatch logo seochat tools logo