0

I am following this tutorial to create own XBlock (http://edx.readthedocs.org/projects/xblock-tutorial/en/latest/getting_started/create_first_xblock.html) When I create the SQLite database:

(venv) $ sudo python xblock-sdk/manage.py syncdb

I get this error:

Error: No module named djpyfs

I tried without sudo, But it has errors too:

Traceback (most recent call last):

  File "xblock-sdk/manage.py", line 9, in <module>
    from django.core.management import execute_from_command_line
ImportError: No module named django.core.management

How to fix this problem? Thank you.

Dmitry Utrobin
  • 359
  • 1
  • 3
  • 15
  • make sure you have followed these steps http://edx.readthedocs.org/projects/xblock-tutorial/en/latest/getting_started/setup_sdk.html, install requirements – frank Oct 30 '15 at 09:05
  • since you working inside an environment , why are you using `sudo python` ? just use `python xblock-sdk/manage.py syncdb` – frank Oct 30 '15 at 09:11
  • I know I dont have to use sudo inside an virtual environment, but It helps to install without any errors (in some commands, not in all). – Dmitry Utrobin Nov 02 '15 at 03:26
  • so `python xblock-sdk/manage.py syncdb` gives you error ? – frank Nov 02 '15 at 03:30
  • Yes, this: Traceback (most recent call last): File "xblock-sdk/manage.py", line 9, in from django.core.management import execute_from_command_line ImportError: No module named django.core.management – Dmitry Utrobin Nov 02 '15 at 03:53
  • have you installed requirements in your environment ? – frank Nov 02 '15 at 04:15
  • Tutorial says to install requirements do this: (venv) $ pip install -r requirements.txt. But there is no this file in xblock-sdk directory. I have found it in /xblock-sdk/doc and to install requirements I used this command: (venv) $ pip install -r doc/requirements.txt – Dmitry Utrobin Nov 02 '15 at 08:53
  • looks like xblock-sdk structure has been changed and the docs are still at the old version.install the requirements using the file requirements/base.txt file. – frank Nov 02 '15 at 09:22
  • check the directory structure and docs here https://github.com/edx/xblock-sdk – frank Nov 02 '15 at 09:22
  • I re-installed XBlock. now it is all OK. Thank you. Frank, how to update my XBlock instance? I wrote in HTML simple text, after I changed but it didnt update. I did everything. But There is no any result. I treid re install it in virtualenv ((venv) $ sudo pip install -e myxblock). I tried re-install in edx-plathorm (sudo -u edxapp /edx/bin/pip.edxapp install ~/xblock_development/myxblock) – Dmitry Utrobin Nov 02 '15 at 10:02
  • unistall your old version of custom xblock, and reinstall it. – frank Nov 02 '15 at 10:07
  • from virtualenv or another ? – Dmitry Utrobin Nov 02 '15 at 10:14
  • if you want to test your custom xblock in edx, uninstall it from there and reinstall it. – frank Nov 02 '15 at 10:19
  • We did it! thank you. I am a beginner in EDX and Python. So I ask a lot of questions. – Dmitry Utrobin Nov 02 '15 at 11:39
  • i dont mind. glad you made it. – frank Nov 02 '15 at 11:43
  • I had to create a var folder in the developmen_directory then change the workbench.log ownership from root to the current user – Apollo Marquis Jun 28 '16 at 13:14
  • had a similar issue, Later I noticed I was not in the "venv". After changing to "venv" things were ok. – Isanka Wijerathne Jun 14 '17 at 08:11

2 Answers2

0

make install on sdk directory will solve this.

0

pip install django-pyfs==2.0 works for me