openedx / XBlock

Framework for building custom learning components that run in the Open edX LMS!
https://docs.openedx.org/projects/xblock/en/latest/xblock-tutorial/index.html
Apache License 2.0
453 stars 217 forks source link

Missing python 2.7.3 library for windows 7? #3

Closed thogan closed 11 years ago

thogan commented 11 years ago

Import error, webob. First, django_nose was missing. After install, webob is missing. Is there library I should install on Windows 7, for xblock? Or, is there some other problem at work?

thogan commented 11 years ago

I have a standard python 2.7.3 installed on a 64 bit machine with Windows 7. Following the xblock installation instructions I get import error messages for missing modules. I have been installing each missing module one at a time: django_nose, webob, and now lxml. Is there a package I can install that will have all of these modules included? Or, will I have to continue this very tedious process?

nedbat commented 11 years ago

Hi, sorry it's slow going. Those requirements were supposed to be installed by the "pip install -r requirements.txt" step. Did that step succeed? It might be more difficult with 64-bit Python. If you are not particular about the version of Python, install 32-bit Python, even on 64-bit windows.

pdpinch commented 11 years ago

Hi Terry. You may want to take a look at the requirements file: https://github.com/edx/XBlock/blob/master/requirements.txt

If you follow the installation instructions (https://github.com/edx/XBlock/blob/master/README.md) there's a command to simplify the process of getting all the pre-requisites:

pip install -r requirements.txt

I haven't tried this myself, so I don't know how accurate the requirements.txt file is. But it does include all the modules you note.

Peter Pinch | Production Manager, OpenCourseWare Massachusetts Institute of Technology One Broadway, 8th Floor | Cambridge MA 02142 E pdpinch@mit.edu | T 617-253-6256 | C 617-652-0183

On Mar 27, 2013, at 2:23 PM, Terry Hogan wrote:

I have a standard python 2.7.3 installed on a 64 bit machine with Windows 7. Following the xblock installation instructions I get import error messages for missing modules. I have been installing each missing module one at a time: django_nose, webob, and now lxml. Is there a package I can install that will have all of these modules included? Or, will I have to continue this very tedious process?

— Reply to this email directly or view it on GitHub.

thogan commented 11 years ago

The pip log after pip install -r requirement.txt is executed did, as you said, install all components, except at lxml it says the following:

building 'lxml.etree' extension

error: Unable to find vcvarsall.bat

After running python manage.py runserver from the xblock directory, in the browser at 127... I get the following error message:

Exception Type: ImportError Exception Value: No module named lxml

nedbat commented 11 years ago

That's a sign that the installer couldn't find a C compiler to compile the lxml package. You can get the lxml package for Win64 from here: https://pypi.python.org/pypi/lxml/3.1.0 Install the lxml-3.1.0.win-amd64-py2.7.exe package, and then try "pip install -r requirements.txt" again. All should be well.

thogan commented 11 years ago

Thanks nedbat for the quick and clear responses. The browser now brings up a clear and error free window.