Setup request

Hi James, I have just discovered pylinac and think it has great potential. I am relatively new to python having used Matlab for the last few years, but am committed to the switch owing to license etc. I am currently using python 2.7 with Anaconda and iPython, however pylinac requires python 3.0. I have been reading around on how to setup a virtual environment but it would be a great help to myself (and probably other python newbies) if you could include this in your setup page.

Cheers
Robin

Hi Robin,
Well I’m glad you stumbled on pylinac. I also used Matlab for several years, so I know the feeling of moving to a new language and some of the difficulties. In all fairness, python has a steeper learning curve than Matlab (Matlab “just works”), but the added flexibility and power I believe makes the switch worth it.

Given that most physicists who tinker around use Matlab, they will likely have the same questions that you have. Setting up a virtual environment is not specific to pylinac, and guides have already been created on it, so while I will take you up on your suggestion of adding a section about that to the documentation, it may be more links and tidbits than a whole procedure. Anaconda is a great distribution though and makes this really easy to get and update things like numpy, which doesn’t install via pip. Let me work on a brief guide and perhaps as I get more feedback I’ll tweak it. You can also contribute to the wiki section on github if want to share your method after you get it working.

Thanks James, I now have it running and have added info onto the wiki. I found this page which contains a good intro to python in the way that I am using it http://sjbyrnes.com/?page_id=67

Cheers
Robin

Dear James and Robin

I was facing with the same thing, when I wanted to play around with it.The best and quickest way I found was to install Winpython.
http://winpython.sourceforge.net/

It has a package for both Python 2.7 and 3.x, making it easier to play with different versions.

Btw I am a admiring the pylinac development, it’s a great way forward.
May I ask why you selected Python 3.x for this package? We are currently using an other wonderful solution QAtrack+ (http://qatrackplus.com/) which is using python 2.7.?

Combining two such great project would be a fantastic…

Best regards

Akos Gulyban

Akos,
Thanks for the suggestion. WinPython, Python(x,y), and Anaconda are all great distributions. I allude to Python(x,y) and Anaconda in the installation docs, and I’m going to flesh out Robin’s wiki post at some point. The choice of distro is arbitrary and is up to the user. I used to use WinPython, but have moved to Anaconda because of the convenient package upgrade ability. But the WinPython/Python(x,y) project is perfectly valid and has no corporate affiliation and both projects have 2.7/3.x distro stacks.

QATrack+ is a wonderful project that Randy should be heartily commended for. I don’t know his feelings on incorporating pylinac; I’m currently learning Django and will probably try to make a small web app for just pylinac functions (unlike QAT+ though, this would be hosted online for all).

The python 3 choice was one of convenience for me. Python 3 has lots of new stdlib modules that aren’t in 2.7. I appreciate that people like 2.7, but I didn’t want to start supporting 2.7 and then drop it later as 3.x becomes more commonplace. I created pylinac largely for me, and hoped it would help others, and I just happen to use python 3. That being said, backporting wouldn’t be overly difficult. I suppose if the demand was high enough I’d do it, but the physicist who uses pylinac is probably flexible enough to have whatever python version they choose (e.g. both) since they’re probably just tinkering around. But the future of pylinac is very open…

Thanks for the kind words! Do leave feedback and/or issues as you use it.

James