-
Notifications
You must be signed in to change notification settings - Fork 197
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
Questions about setting up a local development environment #11
Comments
Here's what I see: I think you are using an older version of IPython Notebook than I am. I started the project using the standard Ubuntu 12.04 versions of ipython and ipython-notebook. That worked for the code that runs the same under 2.7 and 3.3. When I did the section on floats, I needed to run 3.3 in IPython Notebook. At that point I installed ipython3, and ipython3-notebook. For most development on this project now, I run I have updated the readme to show how I installed ipython3-notebook on Ubuntu 12.04. I think if you install ipython3-notebook, or the appropriate version of that for your system, you will see what I see. When I updated my versions of ipython-notebook and ipython3-notebook and then opened the notebooks for the first time, I got a message that the notebooks would no longer be compatible with older versions of ipython notebook. Hope that helps, and please let me know how it turns out. |
Noooo, not python 3 again.. :( |
Ha ha! I'm not sure if you're saying that from a teacher, student, or developer perspective, but I'd be curious to hear. Student perspectiveI focused on Python 3 because I am building these notebooks for teaching people brand new to programming. The thinking is, people who are just starting to program are going to spend more time in Python 3 than Python 2. They don't have any legacy projects they need to maintain, and they don't have any packages they are trying to use that depend on Python 2. Anyone who can code in Python 3 is going to learn Python 2 syntax quickly and easily if they take on a project that requires Python 2. So, with students I have them learn Python 3 until they find themselves needing Python 2. I am finding it's good to bring myself up to speed with Python 3 as well. Contributing to this projectI think someone could contribute to this project without ever touching Python 3, because most of the code is compatible with Python 2. The project code might be different, but at that point it might be good to make separate dedicated notebooks for each project in Python 2 and Python 3. If anyone is staying away from this project just because of Python 3 issues, please let me know and we'll see if there's a straightforward way to address your concerns.Thanks! |
@akkartik, I think I just have a newer version of ipython notebook than you. I don't really think what you are seeing is a python 2/ python 3 issue. |
I think the problem might be that your instructions are in terms of apt-get, but my distro doesn't support the versions you indicate. It would suck to have to upgrade the OS just to install a tool to learn programming. Perhaps you could show how to install the right ipython-notebook in a virtualenv? (I'm trying to figure this out as well. I've been stumped a few times by versioning issues, but hopefully I'll sort it out this time.) |
Thanks, I'll take a look at this shortly. What system/ distro are you on? |
I'm on ubuntu (12.04 precise). Pretty vanilla otherwise. |
All right, I just installed a fresh version of 12.04 in virtualbox, so I could test out the directions on a fresh install. These notebooks just require a later version of ipython and ipython notebook than the standard 12.04 packages. This should get you up and running:
You should not have to uninstall the current versions of ipython and ipython-notebook; this will update your versions of both packages. Can you let me know if that works? You shouldn't have to do anything with Python 3, except for one or two sections in the whole project. |
It worked!! Many thanks, Eric, and sorry for being grouchy. I look forward |
No matter, I've been meaning to get virtualbox set up for a while now. I'm happy to answer more questions, so please don't hesitate to ask. |
I had no idea you could install later versions than the default with apt-get (no tinkering with ppas, etc.) Thanks for the insight. Oh well, I guess I'll punt on installing the right versions inside a virtualenv. One of these days I'll figure out how to do that. |
I got ipython notebook running in a virtualenv using Python 2.7:
This worked for me, and it was really interesting. This installs version 1.1.0 of ipython, which includes ipython-notebook. This is a newer version than what I have in the readme, and I like it better than the 0.13 release. I did not get Python 3.3 running in the virtualenv. I will look at updating the readme to use the 1.1.0 release of ipython. Thanks again for pushing this issue. |
Hi @ehmatthes! I ran iPython using the comments you made in #11 (comment). It ran fine. I shutdown the server and try to run again but iPython wouldn't run. I re-ran the commands again and iPython runs fine. Should iPython execute always in the virtualenv? |
I have just opened this project for the first time in several months. I activate my virtualenv before running ipython. So I think the answer is yes, but I'm not quite sure. Do you want your ipython to be running python2.7 or python3? Edit: I'm going to hit this project hard again in August/ September, the next time I teach a full Python class. One of my goals then is to update the project to IPython 2.x. I will do a full revision of the readme by then, if not earlier. If anyone wants to work on introtopython and is having trouble getting a dev environment set up in the meantime, please don't hesitate to ask, and I will get on this sooner.
|
I am planning to shift to python3 completely (most of my development is still in 2.7). Hence, ipython with python3. I tried using iPython before but not with much success. Hoping to improve my ipython skills with this project. |
IPython is pretty awesome, and it is under rapid development at this point. I'm happy to answer any questions you have, especially in regards to playing with this project.
To be clear, yes I think you need an active virtualenv if you are taking the approach in #11. In this approach, IPython is installed into the virtualenv, and will only run when that virtualenv is active. |
Thank you. I shall read more about IPython and virtualenv. |
Amazing notebooks; thank you so much. I'll be using parts of this to teach a Data Structures course this semester... |
@karthikraman Thanks, that's good to know! If you have any questions or suggestions as you're using the notebooks, feel free to let me know. I'll probably be doing some significant work on the project again this fall when I'm teaching my next Python class. If there's anything you need before then, let me know. What kind of students are you working with? |
I am working with students who don't have a background in Python, but have been exposed briefly to C. The class itself is "Data Structures and Algorithms for Biology", but Python is the language of choice. I teach Python for about 5-6 classes, before introducing data structures, algos and how they're applied in biology. My class is a mix of students, mostly majoring in Biological engineering, but a few others as well (Chemical etc.). Your notes are brilliant. I am making a much more concise notebook, and pointing to your notes in many sections, for more details! |
Thanks so much Eric! Did you make the tables of contents for each notebook by hand or is there a handy script for it? It looks like there is a Jupyter extension for making dynamics tables of contents, but using that extension breaks the ability to send the notebooks through your template. Thanks for your help! |
Hi @glupyan, I did write the toc for each notebook by hand. It never occurred to me to automate that! I keep meaning to go back to this project, but I'm teaching way more math and science than programming these days and I haven't been able to make time for this. But I'm teaching a short Make Your Own PhotoFilter class this week and next, and I'm using jupyter notebooks to teach that class. Hopefully I can add that project notebook to this site. That was the original goal, to make it an easy place to collect interesting projects. Thanks for reaching out! |
Eric, Firstly, great job. I tried following your instructions word by word under section Using virtualenv to set up a development environment and it got me far along though with its unique set of challenges. Hereby, I would like to list out some of the challenges, so that it can help others:
I wasn't sure if these were all bugs or intentionally like that, anyways I went ahead updated all the files and created a pull request, so its easier for next person tweaking with LocalHosting using your codes. |
The readme is pretty sparse right now, so if you are trying to get involved and have any questions about setup, please feel free to ask them here.
The text was updated successfully, but these errors were encountered: