lernanta icon indicating copy to clipboard operation
lernanta copied to clipboard

Error when installing

Open dalareo opened this issue 9 years ago • 9 comments

Hi @dirkcuys, I am trying to install Lernanta without Chef and Vagrant but... When I try to execute the app

python manage.py whatever

I get:

Error: cannot import name setup

dalareo avatar May 05 '16 17:05 dalareo

Hey @dalareo - what instructions did you follow to get lernanta setup?

dirkcuys avatar May 06 '16 09:05 dirkcuys

https://github.com/p2pu/lernanta/wiki/Setup-Lernanta-Manually

dalareo avatar May 06 '16 10:05 dalareo

I wonder if workon lernanta is causing trouble, I haven't used virtualenvwrapper recentky. Try creating a virtual environment by running virtualenv --system-site-packages venv in the lernanta folder and then activate it using source venv/bin/activiate. Then install requirements as per the docs:

pip install -r lernanta/lernanta/requirements/prod.txt
pip install -r lernanta/lernanta/requirements/dev.txt

It's been a while since I've installed lernanta from scratch! We're not actively developing it anymore - it's still running Django 1.3!

Let me know how it goes

dirkcuys avatar May 06 '16 10:05 dirkcuys

I was already using virtualenv. I tried using the option --system-site-packages but I still get the same error. I have NEVER used virtualenvwrapper before. I will try the workon approach instead! I know you're not actively developing learnanta anymore, we've talked about it in another issue-chat. Thank you very much for your patience with me @dirkcuys

I am looking for a lighter-than-EdX MOOC solution but your Jekyll course template is lacking some functionalities. We are developing a team-learning platform (checkout educaas.github.io and github.com/educaas, we are in a veeeery early stage) based on Rancher/Docker but including some standard learning resources as MOOC capability.

dalareo avatar May 06 '16 11:05 dalareo

I actually meant that you shouldn't use virtualenvwrapper.

Since the setup required --system-site-packages, running it on anything newer than Ubuntu 12.04 could potentially be causing the problems.

Sorry, didn't register that we talked about this before :) Lernanta with some surgery could work for you - the course part is actually small compared to the whole project and could be lifted from the rest of the application.

I'm happy to help and be patient ;) - we can also help you out with software on a contract basis, drop me a mail at dirk @ p2pu.org if you're interested.

dirkcuys avatar May 06 '16 11:05 dirkcuys

I tried with virtualenvwrapper but still get the same error:

Error: cannot import name setup

I am using 16.04!! We will have a group session next week and I will put on the table the possibility of counting on you on a contract basis. Thanks again!!

dalareo avatar May 06 '16 11:05 dalareo

Running python -v manage.py shell seems to indicate that there's a problem with django_nose. I strongly suspect that it is related to outdated packages. Try running everything inside a docker image or virtual machine running Ubuntu 12.04 and see if you still get the error? Other than that I can't really help - would love to have the resources to update Lernanta

dirkcuys avatar May 06 '16 12:05 dirkcuys

I tried the installation in a fresh 12.04 Docker container but I still get the same error

dalareo avatar May 06 '16 18:05 dalareo

Ah, I think I know what's going on. Requirements aren't pinned to specific revisions. It seems like this commit in django-nose introduced the error we are seeing. You can try to install an earlier version of django-nose, probably something pre-2014.

dirkcuys avatar May 06 '16 19:05 dirkcuys