How is Anaconda related to Python? - python

I am a beginner and I want to learn computer programming. So, for now, I have started learning Python by myself with some knowledge about programming in C and Fortran.
Now, I have installed Python version 3.6.0 and I have struggled finding a suitable text for learning Python in this version. Even the online lecture series ask for versions 2.7 and 2.5 .
Now that I have got a book which, however, makes codes in version 2 and tries to make it as close as possible in version 3 (according to the author); the author recommends "downloading Anaconda for Windows" for installing Python.
So, my question is: What is this 'Anaconda'? I saw that it was some open data science platform. What does it mean? Is it some editor or something like Pycharm, IDLE or something?
Also, I downloaded my Python (the one that I am using right now) for Windows from Python.org and I didn't need to install any "open data science platform".
So what is this happening?
Please explain in easy language. I don't have too much knowledge about these.

Anaconda is a commercial python and R distribution. It aims to provide everything you need (Python-wise) for data science "out of the box".
It includes:
The core Python language
100+ Python "packages" (libraries)
Spyder (IDE/editor - like PyCharm) and Jupyter
conda, Anaconda's own package manager, used for updating Anaconda and packages
Your course may have recommended it as it comes with these extras but if you don't need them and are getting on fine with vanilla Python that's OK too.
Learn more: https://www.anaconda.com/distribution/

Anaconda is a Python distribution that makes it easy to install Python plus a number of its most often used 3rd party libraries in a flexible way on a Windows or Linux machine.
My experiences with it are very positive, both on Windows and Linux. It is quite complete and avoids problems in building libraries that you need from source code, that frequently plague one by one installations of those libraries by tools like pip.
By the way: It's very wise to start with 3.5 or 3.6 since 2.7 is approaching the end of its lifecycle, though many applications still depend on it.
As for tutorials: Pythons own docs are quite suitable for learning the language.
https://docs.python.org/3/tutorial/

Anaconda is a Python-based data processing and scientific computing platform. It has built in many very useful third-party libraries. Installing Anaconda is equivalent to automatically installing Python and some commonly used libraries such as Numpy, Pandas, Scrip, and Matplotlib, so it makes the installation so much easier than regular Python installation. If you don't install Anaconda, but instead only install Python from python.org, you also need to use pip to install various libraries one by one. It is painful and you need to consider compatibility, thus it is highly recommended to directly install Anaconda.

Related

Setting up python 3 environment in Windows the easy way: just install from python.org, or would one really benefit from miniconda or similar?

I want to help a friend set up the environment for Python 3 in Windows 10 in a quick and easy way. I know that you can just download Python 3 for Windows from python.org and it already comes with Pip by default. I assume that then all you need is an editor and you're good to go, or does this Windows installation lack something essential, like the ability to use command line or something else?
Many people seem to recommend miniconda, but I don't understand what would be its benefit compared to the above method. I just want to get my friend ready to learn and code python with minimal amount of extra hassle in the beginning. Pip will be needed but don't need any pre-installed libraries.
I installed so many different environments in the beginning myself (for example the above method, Winpython, Anaconda, etc.) that I'm not sure which one of them was actually needed and would've sufficed by itself.
A very bare-bones install would be to get an uncluttered editor, then just install python from python.org.
I would actually advise against this unless you're only planning on using python a couple of times. As soon as you start using new packages or versions, a proper editor and environment handler becomes really important.
Pycharm does very well at handling conda and virtual environments and allows you to do it through the GUI which is good for people new to programming. You can select packages through the GUI and create environments for different projects very easily; importantly, it's also easy to remove them again. You can even pip/conda install packages through pycharm's terminal if you want to demonstrate the different installation methods.
The following things are necessary to know before knowing about package management tool
Python is interpreted language and its interpreter is written mainly in C programming language
You can write python libraries in the Python programming language or another programming language one I know isLLVM
Any code that you write using any compiled language like C, C++, or Java can be integrated or imported into another Python script. This code is considered as an "extension."
These libraries written in other programming language does not have what so called setup.py these package management tools handle dependencies with its own virtual environment mechanism
This is blog for writing extensions in c or c++ programming language Check here
so these package management tool tries to do more than what pip does handle Python dependencies as well as dependencies written in another programming language because these pacakage you install does not goes into site-packages
Starting Python pip is good
Mastering Python choose any package management alongwith pip

python3.7 biopython, how to learn python3 and still use biopython

I'm very new to python and biopython, currently using a mac. I have python v2.7 and v3.7, and I would like to be learning with python3. Biopython only works on v2.7. Is it worth installing python V3.4 as well as these other 2 versions so I can learn python3 and use biopython? Or remove python3.7 and add 3.4? Even if I install python3.4 will biopython work if it was installed prior? Very confused biologist here.
Firstly, check out this page: https://biopython.org/wiki/Download
You don't have to worry about biopython being bound to a specific version of python - you can use it with either v2.7 or v3.4/v3.5/v3.6. You can also have multiple version installed on your system but I recommend you to focus on digging deeper into one of them. Personally, I work now for several years with python3.x (at the moment 3.6) but I know a lot of people sticking to v2.7.
Having also a bioinformatics background, one thing that I can highly recommend you at the beginning of your journey is taking a course such as:
https://www.coursera.org/specializations/python
There is also a bunch of free tutorials on youtube - you will easily find one that fits your needs by searching for "python tutorial" or "python getting started".
Get yourself comfortable with the language, check out the basics such as data structures, databases, and data visualization. Check also some "python cheat sheets" - they can help you pick up the basic concepts of the language.
All the best and keep on coding!
From the biopython installation document:
Biopython is designed to work with Python 2.5 to 2.7 inclusive. Python 2.7 is the final 2.x series release, and this would be our recommended version (assuming all other Python libraries you plan to use support it).
Upgrading bug-fix releases (for example. 2.6.1 to 2.6.2) is incredibly easy and won’t require any re-installation of libraries.
Upgrading between versions (e.g. 2.6 to 2.7) is more time consuming since you need to re-install all libraries you have added to python.
As of Biopython 1.62 we officially support Python 3, specifically Python 3.3. Python 3.0, 3.1 and 3.2 will not be supported.
Also from the Biopython website:
Python 2.7, 3.4, 3.5, or 3.6 or PyPy, including the Python development header files like python.h
So biopython is inconsistent with their documentation.
I think your best option is to download either the latest version of Python 2 or 3 and see if it works.

Anaconda Python Modules in Standard Python 3.5

I'm pretty new to programming, and am generally unfamiliar with how stuff like environments and distributions work.
I found myself needing to use a module in the SciPy library for python, and when the standard pip install failed, I got to googling and found that the recommended way to access these modules is to install an entirely new python distribution called Anaconda with it's own more advanced spyder IDE, more included libraries, etc.
I'm not averse to learning the new IDE, but my question is that if I want to continue using the simple and fast IDLE IDE for making scripts that make use of the SciPy modules, is there any way to get my existing Python35 installation recognize the included Anaconda modules? Or do I have to use Anaconda for all of my future programming now?
Note: I was able to get scipy seperately via http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy, but I'm still interested in using the other included anaconda modules.
My apologies if this is an inappropriate question or if it has been answered before, I searched to the best of my abilities but didn't find what I was looking for.

Anyone have experience using the Nessi Python Network Simulator?

I am working on creating a simulation for the selective-reject ARQ protocol for my networking class. I found a great network simulator, written in python called Nessi:
http://jer.iict.ch/logiciels
The one problem is that it seems Nessi relies on an older version of python (2.4) than what I currently have installed on my computer(2.7).
There is almost no documentation and I am trying to figure out where to begin!
I have two questions:
Has anyone tried installing Nessi on Snow Leopard, OSX?
I am thinking of using virtualenv to have a contained version of
python and the necessary modules for Nessi. Is there something else
I should be considering?
It is possible to run it in Snow Leopard.
Use a package management system like fink to install the dependencies required for this package, I think most of the dependencies can be installed using fink like(psyco, numpy, matplotlib,wxpython), you have to experiment with newer version of python to see how it goes, because certain libraries available in fink are for newer version of python.
Fink separates the binary it installs from system binaries, so you can work without fear of damaging your system binaries.

Python development setup

So, id like to start serious python development, and its proven to be a big pain. Im not worried at all about the language itself; I like it well enough and I will have no problems picking it up. But the ecosystem is driving me crazy.
First I tried to get up and running under windows. I gave up on that after a few days, as 90% of packages dont include windows support / install instructions. So I switched to macosx, which people said was good for mac development.
More frustration ensues. Id like to use python as a matlab replacement and tool development platform, so spyderlib seems like an excellent tool. But now ive been busy trying to build pyqt on my mac for two days, to no avail, and im starting to question the wisdom of it all. Obviously, following several guides literally invariantly ends in cryptic errors. For which platform was this dependency built? What arcane compiler flags need to be set? I dont know and I dont care; why doesnt the installer figure it out? Oh wait, there isnt any... I want to USE these tools, not first completely reverse engineer them to find out how to build them.
There is a vast amount of implied knowledge in all the documentation I can find on these matters, both with regard to unix and pythonic quirks. Is there any way to scale this mountain, in a place with a managable learning curve? Right now I have no idea what im doing. Or should I go back to windows and try to coerce the unix packages I need into cooperation?
On Mac OS X, you can get spyder with macports. This should build everything needed.
If you prefer Windows, take a look at Python(x,y). It has a bunch of scientific tools pre-built, including spyder.
Finally, the Enthought Python distribution is worth considering for scientific work.
Have you tried ActivePython?
Why battle with compiling the modules yourself when you can get the pre-built packages from PyPM?
pypm install pyqt4 matplotlib scipy numpy
From my experience the best platform for kind of project you're describing is Linux. There you just install the libs you need from package manager and that's it. Binary packages, so compiling is not required.
If you want to stick with MacOS X, you should install either MacPorts or Fink. It's usually easy to use. Problem is, that things like Qt take forever to compile. But you won't be doing that very often.
As for installing Python modules, the best is PIP, which is very nice replacement for easy_install did does much more. Especially useful if you want virtualenv setup.
This is nearly the exact opposite of my experience with Python on Windows. Python itself installs with a binary installer, most add-on packages support easy_install, others provide binary installers of their own. The IDE I use is SciTE, which uses the old DOS install model - copy the files to a directory and run the SciTE.exe file. If you get a source distribution of a Python package, go to the directory containing setup.py and run python setup.py install. Maybe that's the implied knowledge you're talking about.
You can also find many unofficial Windows binaries at http://www.lfd.uci.edu/~gohlke/pythonlibs/.
I switched to Mac a few years ago and found that it took me quite a while of googling to properly install all the packages I needed for Python development. While I installed everything I made a list of the steps required to setup a functional system that may be appropriate for you as well. I usually use NetCDF4, HDF5, Numpy, Matplotlib, f2py, and Fortran in combination with Python. I published my list of 22 setup-steps for installing from source on my website. Installing from source is somewhat more time-consuming than using macports and fink, but enables you to have a working environment that is optimized for your system.

Categories