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

Issue with installation #357

Closed
buzzard10 opened this issue Feb 18, 2017 · 16 comments
Closed

Issue with installation #357

buzzard10 opened this issue Feb 18, 2017 · 16 comments

Comments

@buzzard10
Copy link

buzzard10 commented Feb 18, 2017

Hi
i have issue:

Traceback (most recent call last):
File "manage.py", line 4, in
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management

@rolandgeider
Copy link
Member

Hi there! This looks like you forgot to activate the virtualenv, you need to do the source /path/to/venv/bin/activate before running manage.py

@buzzard10
Copy link
Author

I have the newest version and wger is in the home folder (this is just test version on local vm). Can you tell me how to activate this virtualenv?
I tried /home/user/wger/venv/bin/activate, but after run this script, i tried to run in /wger path "python manage.py runserver" and still have error:

Traceback (most recent call last):
File "manage.py", line 4, in
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management

Is there any chance that this error is related to django? Maybe i need to install something?

@buzzard10
Copy link
Author

And also i want to ask about CentOS. Is there any way to install WGER on CentOS 7? 😃

@rolandgeider
Copy link
Member

Basically what it says in the README, two days ago I changed a couple of things on how to install the application so if you follow the instructions and something doesn't work, then I want to hear about it 😃 If you just want to try it out, you can perhaps try the docker images?

@rolandgeider
Copy link
Member

Ah, almost forgot. Yes, the application does work on centOS, the only thing is that the package names mentioned in the docs are a bit different (you might want to take a look at https://wger.readthedocs.io/en/latest/install.html)

@buzzard10
Copy link
Author

I need to test this on machine, with installation and etc 😄
Hmm i try everything again and now i have something like this after python panage.py runserver

(venv-django) user@V39:/tmp/wger$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 15, in
setup_django_environment(get_user_config_path('wger', 'settings.py'))
File "/tmp/wger/wger/tasks.py", line 385, in setup_django_environment
django.setup()
File "/tmp/venv-django/lib/python3.5/site-packages/django/init.py", line 17, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/tmp/venv-django/lib/python3.5/site-packages/django/conf/init.py", line 55, in getattr
self._setup(name)
File "/tmp/venv-django/lib/python3.5/site-packages/django/conf/init.py", line 43, in _setup
self._wrapped = Settings(settings_module)
File "/tmp/venv-django/lib/python3.5/site-packages/django/conf/init.py", line 99, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/tmp/venv-django/lib/python3.5/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 986, in _gcd_import
File "", line 969, in _find_and_load
File "", line 956, in _find_and_load_unlocked
ImportError: No module named 'settings'

@rolandgeider
Copy link
Member

one step ahead! Now it can't find the settings to start the application, which is strange. Is there a settings.py in the source folder? In any case, you can create a new one like this wger create_settings --settings-path /path/to/wger/settings.py --database-path /path/to/database.sqlite

@buzzard10
Copy link
Author

This is really strange, because i'm trying to install wger in /tmp/wger, and app try do something in /home/wger/.
This is standard procedure? 😃

@rolandgeider
Copy link
Member

Not really 😄

You can install the application wherever you want (the settings file can be wherever you want as well, it just has to be importable). If you want to install wger on /tmp/wger, you would just need to change the paths in the beginning, there shouldn't be anything hard coded. What does the app try to do in /home/wger?

@rolandgeider
Copy link
Member

Did you manage to get it running?

@buzzard10
Copy link
Author

Thanks for your patient.
Now i have some problems with python, so just give me a few days 😄

I really appreciate your help and support 🥇

@rolandgeider
Copy link
Member

No problem! I also have an interest in making sure the application can be installed easily 😉

@buzzard10
Copy link
Author

Hi 😄 So, today i installed WGER with docker [wger.devel] and everything is ok.
Now in few days i'll try to install wger on docker [wger.apache] (i have some issues with access to docker outside host), and after that i'll try with production installation without docker. I already tried to install wger on ubuntu without docker, but i have problem with those commands:

wger create_settings
--settings-path /path/to/current/folder/settings.py
--database-path /path/to/current/folder/database.sqlite
$ wger bootstrap
--settings-path /path/to/current/folder/settings.py
--no-start-server
$ python manage.py runserver

for now i have just two questions. I'm new in docker so i don't know, is there any disadvantages of using docker in production?
And second: Can i download polish file from https://www.transifex.com and import to WGER installation?

@rolandgeider
Copy link
Member

Just a heads up, currently the apache docker image is broken. For some reason (#361) the python path of the virtual env is not being used, but I hope I can fix this soon.

What problems do you have with those commands? Do you get some error message?

As for using docker in production, well that's a hot topic. In any case you'd want to configure the docker images a bit differently (e.g. at the moment you would lose all the data when you delete the container, you'd need to move the database outside of it, etc.). I personally have no experience with docker in production, you should better read what other people have done and how they recommend to use it.

You can download the updated Polish translation from transifex (have you been translating it?), but you need to follow these steps to activate it on the application.

@rolandgeider
Copy link
Member

The apache docker image is fixed now

@rolandgeider
Copy link
Member

There doesn't seem to be anything left to do here, if you have questions or something still doesn't work, just re-open the issue

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

2 participants