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

Starting Django server problem #26

Open
mohds opened this issue Mar 31, 2017 · 1 comment
Open

Starting Django server problem #26

mohds opened this issue Mar 31, 2017 · 1 comment

Comments

@mohds
Copy link

mohds commented Mar 31, 2017

Dear all,

I am trying to deploy the nexusdash application but i am getting an error when I run the manage.py file
below is a copy from my terminal, you can see that all the requirements are satisfied:

(nexusdash)user1:~/Desktop/nexus9000-master/nexusdash $ pip install -r requirements.txt Requirement already satisfied: Django==1.6.5 in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from -r requirements.txt (line 1)) Requirement already satisfied: django-bootstrap3==4.8.2 in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from -r requirements.txt (line 2)) Requirement already satisfied: django-debug-toolbar==1.2.1 in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from -r requirements.txt (line 3)) Requirement already satisfied: python-nvd3==0.12.2 in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from -r requirements.txt (line 4)) Requirement already satisfied: lxml==3.3.5 in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from -r requirements.txt (line 5)) Requirement already satisfied: xmltodict==0.9.0 in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from -r requirements.txt (line 6)) Requirement already satisfied: South==1.0 in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from -r requirements.txt (line 7)) Requirement already satisfied: django-celery==3.1.10 in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from -r requirements.txt (line 8)) Requirement already satisfied: pycrypto==2.6.1 in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from -r requirements.txt (line 9)) Requirement already satisfied: sqlparse in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from django-debug-toolbar==1.2.1->-r requirements.txt (line 3)) Requirement already satisfied: setuptools in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg (from python-nvd3==0.12.2->-r requirements.txt (line 4)) Requirement already satisfied: Jinja2>=2.7.2 in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from python-nvd3==0.12.2->-r requirements.txt (line 4)) Requirement already satisfied: awesome-slugify in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from python-nvd3==0.12.2->-r requirements.txt (line 4)) Requirement already satisfied: celery>=3.1.10 in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from django-celery==3.1.10->-r requirements.txt (line 8)) Requirement already satisfied: MarkupSafe>=0.23 in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from Jinja2>=2.7.2->python-nvd3==0.12.2->-r requirements.txt (line 4)) Requirement already satisfied: regex in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from awesome-slugify->python-nvd3==0.12.2->-r requirements.txt (line 4)) Requirement already satisfied: Unidecode<0.05,>=0.04.14 in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from awesome-slugify->python-nvd3==0.12.2->-r requirements.txt (line 4)) Requirement already satisfied: kombu<3.1,>=3.0.37 in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from celery>=3.1.10->django-celery==3.1.10->-r requirements.txt (line 8)) Requirement already satisfied: pytz>dev in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from celery>=3.1.10->django-celery==3.1.10->-r requirements.txt (line 8)) Requirement already satisfied: billiard<3.4,>=3.3.0.23 in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from celery>=3.1.10->django-celery==3.1.10->-r requirements.txt (line 8)) Requirement already satisfied: amqp<2.0,>=1.4.9 in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from kombu<3.1,>=3.0.37->celery>=3.1.10->django-celery==3.1.10->-r requirements.txt (line 8)) Requirement already satisfied: anyjson>=0.3.3 in /home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages (from kombu<3.1,>=3.0.37->celery>=3.1.10->django-celery==3.1.10->-r requirements.txt (line 8))

required exports:

(nexusdash)user1:~/Desktop/nexus9000-master/nexusdash $ export SECRET_KEY=123456789 (nexusdash)user1:~/Desktop/nexus9000-master/nexusdash $ export DJANGO_SETTINGS_MODULE=nexusdash.settings.local

trying to run manage.py:

(nexusdash)user1:~/Desktop/nexus9000-master/nexusdash $ python manage.py syncdb Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line utility.execute() File "/home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages/django/core/management/__init__.py", line 272, in fetch_command klass = load_command_class(app_name, subcommand) File "/home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages/django/core/management/__init__.py", line 75, in load_command_class module = import_module('%s.management.commands.%s' % (app_name, name)) File "/home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module __import__(name) File "/home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages/south/management/commands/__init__.py", line 10, in <module> import django.template.loaders.app_directories File "/home/user1/miniconda/envs/nexusdash/lib/python2.7/site-packages/django/template/loaders/app_directories.py", line 25, in <module> raise ImproperlyConfigured('ImportError %s: %s' % (app, e.args[0])) django.core.exceptions.ImproperlyConfigured: ImportError django_nvd3: No module named django_nvd3

Please advise
and thank you for your time

@mohds
Copy link
Author

mohds commented Mar 31, 2017

i believe the problem to be with 2 different Python versions installed (miniconda Python and the main Python) as seen below:
(nexusdash)user1:~/Desktop/nexus9000-master/nexusdash $ sudo which python /usr/bin/python (nexusdash)user1:~/Desktop/nexus9000-master/nexusdash $ sudo python -V Python 2.6.6 (nexusdash)user1:~/Desktop/nexus9000-master/nexusdash $ which python /home/user1/miniconda/envs/nexusdash/bin/python (nexusdash)user1:~/Desktop/nexus9000-master/nexusdash $ python -V Python 2.7.13 :: Continuum Analytics, Inc.
my Python 2.6.6 has no psycopg2 package which is probably the problem
Currently trying the fix this problem while trying to avoid breaking the system (yum depends on the original Python version)

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

No branches or pull requests

1 participant