joke2k / django-faker

Django-faker uses fake-factory to generate test data for Django models and templates
MIT License
245 stars 48 forks source link

Problem when installing #13

Open patrick91 opened 10 years ago

patrick91 commented 10 years ago

Hi all, I get this error when installing django-faker:

Step 19 : RUN pip install -r requirements.txt
 ---> Running in 82fdb2379bfe
Downloading/unpacking Django (from -r requirements.txt (line 1))
Downloading/unpacking South (from -r requirements.txt (line 2))
  Running setup.py (path:/tmp/pip_build_root/South/setup.py) egg_info for package South

Downloading/unpacking django-suit (from -r requirements.txt (line 3))
  Running setup.py (path:/tmp/pip_build_root/django-suit/setup.py) egg_info for package django-suit

Downloading/unpacking django-parler (from -r requirements.txt (line 4))
  Running setup.py (path:/tmp/pip_build_root/django-parler/setup.py) egg_info for package django-parler

    warning: no previously-included files matching '.DS_Store' found anywhere in distribution
    warning: no previously-included files matching 'Thumbs.db' found anywhere in distribution
    warning: no previously-included files matching 'Desktop.ini' found anywhere in distribution
    warning: no previously-included files matching '*.swp' found anywhere in distribution
    warning: no previously-included files matching '*~' found anywhere in distribution
    warning: no previously-included files matching '*.bak' found anywhere in distribution
Downloading/unpacking django-model-utils (from -r requirements.txt (line 5))
  Downloading django-model-utils-2.2.tar.gz
  Running setup.py (path:/tmp/pip_build_root/django-model-utils/setup.py) egg_info for package django-model-utils

Downloading/unpacking django-polymorphic (from -r requirements.txt (line 6))
  Downloading django_polymorphic-0.5.6.tar.gz
  Running setup.py (path:/tmp/pip_build_root/django-polymorphic/setup.py) egg_info for package django-polymorphic

    warning: no files found matching 'DOCS.rst'
    warning: no files found matching 'CHANGES.rst'
Downloading/unpacking djangorestframework (from -r requirements.txt (line 7))
Downloading/unpacking django-notification (from -r requirements.txt (line 8))
  Downloading django-notification-1.2.0.tar.gz
  Running setup.py (path:/tmp/pip_build_root/django-notification/setup.py) egg_info for package django-notification

Downloading/unpacking celery (from -r requirements.txt (line 9))
Downloading/unpacking redis (from -r requirements.txt (line 10))
  Running setup.py (path:/tmp/pip_build_root/redis/setup.py) egg_info for package redis

    warning: no previously-included files found matching '__pycache__'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
Downloading/unpacking django-allauth (from -r requirements.txt (line 11))
  Running setup.py (path:/tmp/pip_build_root/django-allauth/setup.py) egg_info for package django-allauth

Downloading/unpacking django-faker (from -r requirements.txt (line 12))
  Downloading django-faker-0.2.tar.gz
  Running setup.py (path:/tmp/pip_build_root/django-faker/setup.py) egg_info for package django-faker
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_root/django-faker/setup.py", line 17, in <module>
        version=__import__('django_faker').__version__,
      File "django_faker/__init__.py", line 6, in <module>
        from django.conf import settings
    ImportError: No module named django.conf
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_root/django-faker/setup.py", line 17, in <module>

    version=__import__('django_faker').__version__,

  File "django_faker/__init__.py", line 6, in <module>

    from django.conf import settings

ImportError: No module named django.conf

do you know what's wrong?

kmmbvnr commented 9 years ago

+1

salazarfelipe commented 9 years ago

I have the same when run pip install -r requirements.txt

oanabotezat commented 9 years ago

@elpipesalazar do you still have the issue? I also had it and I solved it by:

  1. removing django.faker from requirements.txt,
  2. running pip install -r requirements.txt in my virtualenv
  3. adding django.faker back to requirements.txt
  4. running pip install -r requirements.txt AGAIN in my virtualenv

tada!

kmmbvnr commented 9 years ago

@oanabotezat - that's not a solution.

phoebebright commented 9 years ago

Created a pull request to fix this by simply moving the import django.conf statement in .init.py to the function where it is used. Not sure this is correct, but seems to work.

monkeypants commented 8 years ago

+1

This makes django-faker almost unusable on my project. My horrible kludge is to put django-faker into a second requirements file and pip install it after the main one.

prateektiwari7 commented 6 years ago

@oanabotezat

It works for me thanks