Closed hariiyer16 closed 11 years ago
Hi @hariiyer16.
Thanks for the comment on the documentation. I will update it according to your report.
Regarding using coursera-dl, you will have (assuming that you are in the main directory of the program) to call it like:
./coursera-dl -u your.registered@email.example.com -p yourpassword name-of-the-course
Note the ./
in the front of the command.
I don't know what version of the Python interpreter Snow Leopard has, though. You need to make sure that you have Python 2.6 or 2.7.
Hope this helps,
Rogério.
Hi Rogério, Thanks for your help. I have Python 2.7.5 in the following directory: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/
I tried the following on the bash: cd /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/ ./coursera-dl -u username -p pass -d /my/coursera/courses/ pgm-003
Got the same error: -bash: ./coursera-dl: No such file or directory
I know this is pretty basic and I am not so comp. savvy.
Best, Hari
Here are some instructions to get you started (maybe to basic ;)) :
sudo easy_install pip
cd ~/Documents/coursera
sudo pip install -r requirements.txt
chmod +x coursera-dl
To run the script, open terminal
cd ~/Documents/coursera
./coursera-dl -u <username> <class_name>
, you should replace <username>
with your coursera username (email adress) and <class_name>
with the class identifier (if you visit the class website, the url should have the form class.coursera.org/class_name/..., its the class_name you need). For more options run ./coursera-dl -h
Let us know if this works for you.
Thanks jonasdt for your response. I tried exactly what you wrote and ran the python script: ./coursera-dl -u user@email.com -p password -d /my/coursera/courses/pgm-003
However I got the following error:
Traceback (most recent call last):
File "./coursera-dl", line 48, in
I wonder if this is because of the Python version conflicts. The default python version, which I had recently installed using MacPorts is: $ python -V Python 2.7.5
The path of the site-packages for this python installation is: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
When I run: sudo pip install -r requirements.txt the packages are installed to another installation of Python (I can see that argparse, beautifulsoup4, nose, requests are now in this folder), which is: /Library/Python/2.6/site-packages
I don't know how to force-install the said packages in my Python2.7.5 version (which is what I would liek to use routinely). My $PATH is: $ echo $PATH /opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin
I wonder whether for some reason the coursera-dl script is using the Python2.7 installation by default (perhaps because I have the PATH setup such the bash searches for Python2.7 first), but the relevant packages are in Python2.6.
Well, all this is just my guess from few hours of troubleshooting. Would be great to hear what could be the problem, and the solution.
Thanks.
Try pip-2.7
(or /opt/local/bin/pip-2.7
) instead of pip
.
Thanks again jonasdt. It worked now. I used: sudo /opt/local/bin/pip-2.7 install -r requirements.txt
And I am able to download the material now. Thanks a lot to all you guys.
Great. @hariiyer16. I'm closing this then.
they says to me open terminal i have no terminal how can i have terminal please tell me from where i can get the terminal
I just installed the coursera downloader as follows:
sudo port install py-beautifulsoup sudo port install py-argparse sudo port install py-setuptools
When I ra "install py24-distribute", I had an error saying I should use "install py-setuptools". So I used the latter. The installation seemed fine.
But when I run "coursera-dl -u" in my terminal, I get the error: -bash: coursera-dl: command not found
I would really appreciate help with getting this running. I am using a Mac OSX (Snow leopard)
Best Hari