Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation error #7

Closed
ouhouhsami opened this issue Oct 2, 2012 · 13 comments
Closed

installation error #7

ouhouhsami opened this issue Oct 2, 2012 · 13 comments
Labels

Comments

@ouhouhsami
Copy link

Hello,

I have a requirements.txt file to install python related packages, and inside I have got your (great) app.
But, when I run pip install -r requirements.txt, I get :

File "/srv/brahms/.virtualenvs/test/build/Django-Select2/setup.py", line 111, in <module>

    VERSION = __import__(PACKAGE).__version__

  File "django_select2/__init__.py", line 3, in <module>

    from django.conf import settings

ImportError: No module named django.conf

which is "normal" because, due to the way pip works, django is not allready installed.

one way to solve this issue would be to have a dedicated version.py file inside your module.

Regards,

@applegrew
Copy link
Owner

Ohk... But I have assumed that Djnago will always be installed before, which definitely needed for this app. So, your uses case is that you are installing this app to the system lib and installing Django in virtualenv?

@ouhouhsami
Copy link
Author

My use case is: I build a virtualenv from scratch, installing at the same time django and django_select2 in my virtualenv.

@applegrew
Copy link
Owner

Then if django is installed before django_select2 then it should not be a problem, as it naturally should be. I am just trying to understand if there is more to it than I currently understand. :-)

@toabi
Copy link

toabi commented Oct 2, 2012

I have the same problem in a buildout environment… although it's last in all configuration files.

edit: Well. It seems that I can't really fix that with my buildout configuration. I also vote for a dedicated version.py so that django stuff doesn't have to be there at install-time.

@ouhouhsami
Copy link
Author

@applegrew : the thing is that buiding env from scratch, pip try to install your app, know it requires django but need to import django.conf.settings in init.py which is not available

@applegrew
Copy link
Owner

@ouhouhsami Even if I separate __version__ into say version.py and I put that in django_select2 dir then accessing that module will trigger __init__.py right? So, maybe before from django.conf import settings I need to check if django module is available right?

@applegrew
Copy link
Owner

Right now made a commit to Master. Can you please test it and let me know if it works for you.

@applegrew
Copy link
Owner

Please let me know if it works for you. Then I will release it as a package.

@toabi
Copy link

toabi commented Oct 4, 2012

@applegrew It works for me now, thanks a lot!

@applegrew
Copy link
Owner

Gr8 then. I will release this as version 3.1.2.

@ouhouhsami
Copy link
Author

It's good for me too ! Thanks

@applegrew
Copy link
Owner

Ok. Gr8

@applegrew
Copy link
Owner

version 3.1.2 released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants