create virtual environment for Enthought Training on Debian - python

I'm running a 64-bit flavor of Debian (LMDE) with GNOME, which includes a system python and various python-using applets and applications. I have a long-standing interest in scientific software, but only recently acquired some spare time and an Enthought Training license. So I'd like to get setup to work the Enthought Training exercises, which apparently means installing Canopy (formerly EPD), possibly et al.
I therefore want to install Canopy (and whatever else I need to do the Enthought Training that is not independently available via debian packages, as opposed to python packages) into a python virtual environment (as opposed to a VM like KVM, VirtualBox, or VMware) so as not to cause problems with dependencies of my system python. How to do this? conda? venv? virtualenv? Unfortunately I'm not seeing any howto's on Enthought's site, which is why I'm asking here (since they recommend asking on stackoverflow with tag=enthought).
Detailed howto is appreciated, as I am still pretty weak pythonically :-(

Unnecessarily complicated. If you install Enthought Canopy and don't make it your default Python, it won't interfere with your system python at all, as by default it installs entirely into your home directory. Enthought Python will be the default inside the Canopy App and inside any Canopy Terminal that you open from the Canopy Tools menu, but not otherwise.
It may help you to know that when you install a python package, you install it into a particular python installation, not into your system at large. So any packages that you install into Canopy, using Canopy's package tools, will just be installed in Canopy not into your system python.

Related

anaconda installation with python already installed

I have python 3.8 installed in my windows 10 machine as system python.
I want to install anaconda. What precautions/steps should I take so that the system python does not interfere with the anaconda installation(which I am doing at a user level) while executing binaries or installing packages?
There are no specific precautions to take: a standard install of Anaconda won't replace the default Python installation of your system, unless you ask for it explicitly during setup.
Afterwards, you will be able to create independent conda environments, each of them having their own Python version and set of packages.
As #Woodford pointed to in eir comment, you will learn a lot by looking at the docs.

Does installing Python also install libraries like scipy and numpy?

I just got a new computer, and I was installing some Python libraries. When I tried to install numpy, I got a message on the console saying numpy was already downloaded. I went into the library folder, and not only was numpy there, but scipy, matplotlib, and a bunch of other libraries as well. How is this possible, considering this computer is brand new? I had installed Python the previous evening, so does installing Python automatically install these libraries as well?
It depends on which Python package you install.
On any desktop oriented Linux distribution, installing the Python package will only install Python. And in practice, it is generally already installed.
On Windows (and perhaps OS X), you need to pick a Python bundle somewhere. Perhaps did you choose Anaconda, which AFAIK installs a lot of common Python libraries (as opposed to its light version Miniconda).
Python does not ship with these libraries unless you are using a pre-packaged distribution such as Anaconda.
If you copied your data from your previous computer to this one, you may have copied the python installation (and thereby the libraries you had installed before) in your appdata folder.
Another possibility is that you have install Anaconda, which is targeted especially at scientific things, and comes with numpy, scipy and some other things preinstalled.
Although this is not the place for these types of questions, yes, there is no need to install libraries, as most of the times when you download Python in a distribution, such as Anaconda, they are also included.

Confusion between Python and Anaconda

Recently I have started programming in Python (Python 3.5) on my Linux OS. But I am confused about Anaconda. What is it actually? Is it a version of Python or something else? If I do not install Anaconda will there be any limitations?
Anaconda is a free and open-source Python distribution and collection of hundreds of packages related to data science, scientific programming, development and more. Python is included in the Anaconda distribution. It is not an IDE (like PyCharm that mentioned in the comments) though it can be configured with most IDEs. I will note that the distribution includes an IDE called Spyder. It also comes with a platform-agnostic package manager called conda.
You can read more here: https://docs.continuum.io/anaconda/
Anaconda is a popular Python data science platform.
Anaconda is a commercial open source distribution of:
Python and R programming languages for large-scale data processing, predictive analytics, and scientific computing, that aims to simplify package management and deployment.
Also, you can very well install Anaconda for any operating system i.e linux or windows. They have navigator which will be of great use to launch modules available.
Anaconda while installing asks Python version :
Find more about anaconda at :
Official Website
Anaconda Docs
Anaconda distribution has been on my computer for last 2 years, on & off, so I feel that I have some experience using it.
Anaconda tries to be a Swiss army knife, and the fact remains, everything that is available with anaconda, can be manually installed using PIP.
If you're a beginner, and don't intend to do some comprehensive stuff in data science/ML field, I don't see any reason that you will need to install Anaconda. If you still want to have conda on your machine, go for it, but if you have python pre-installed, remove it first, and then use conda. (Otherwise you'll have to be specific and observant of where is it that the new python packages being installed on your computer.)
Conda dist. usually occupies 2-4 GB of space very easily.(There is a light installer known as miniconda, but it too goes on to consume memory considerably)
When you use conda command to install a python package, it usually pulls additional (maybe unnecessary for a beginner) packages along with it, thus consuming more & more space on your device. So, if your machine is slow and you have less space, Anaconda is a big NO-NO for you.
Anaconda (IMHO) is a finely tuned hype in the internet space of beginner python users.
And even if you have sufficient memory and a capable device, I don't find why should you spend that for things that you may never use. Unless you have a significant benefit when doing so, which could be more pronounced for those in a professional environment.
There are ways to bulk install everything you need using PIP, And PIP only installs what we demand/command from the terminal, nothing additional stuff, unless we ask for it.
Also, keep in mind, if you want to do data science, ML, Deep learning things, go for 64-bit version of python, so that every module you need can be installed without countering errors.
Anaconda is nothing but a python and R distribution. If you are working on Machine learning or data science field, tou will find anaconda very useful. So installing anaconda will also install python, conda(which is a package manager in anaconda), a lot of third party python packages, an IDE(like spyder), jupyter notebook(which is very helpful to write codes and visualise results and run codes cell by cell) . However, if tou are just a beginner, installing only python would be enough. Python will have certain standard libraries that will be installed along with it. And when u need new packages, you can use pip to install them.
P.s. if you have low memory space and u are just beginning, anaconda is a no no as it will have many packages installed by default, which u might not use. But installing python requires less memory and when u need a third party library, u can use pip to install libraries.

Switch from linux distro package manager to Anaconda

I am using openSUSE Leap 42.1 and do some data analysis work in python. Most of the python packages I use are available in the standard openSUSE repositories (e.g. obs://build.opensuse.org/devel:languages:python); however sometimes they aren't, whereas they are available in Anaconda. I would like to replace all of the python packages installed on my computer with those available through Anaconda.
Is it possible to just install Anaconda in parallel with the normal openSUSE packages or should I manually delete the packages I've installed? I know python is used heavily throughout the operating system so I probably don't want to deep clean the system of python before going the Anaconda route.
Has anyone done this before? I was unable to find any info on this on the Anaconda site, and I'm curious if there is a clean way to do this.
I read the anaconda documentation, and there is no evidence of anaconda packages replacing your openSUSE packages. There isn't a reason for it to do so. If I got it right, then Conda is very similar to ruby's gem and similar tools, which definitely don't replace the installed packages. I think you can feel free to install it next to your current packages. Also, you can specify the python and python package version in the anaconda envinroments, which is another thing which it allows you to do, so you can decide what you will use there. Note, I'm not a conda user, this is how I understood the docs. Hope this helps.

How to install packages in Enthought Canopy without X?

I have been using Enthought Python Distribution (EPD) for some time. It allows the user to install the latest precompiled python packages (e.g. numpy, scipy) with a single command.
Today I wanted to install EPD on a new machine, but found that they've replaced it by a new product called Enthought Canopy. The problem with Canopy is that it has a GUI:
__boot__.py: cannot connect to X server
My machines are headless and don't run X servers. Is it possible to install packages in Canopy without X? I've searched their knowledge base but couldn't find a solution. They request that unpaid and academic users post questions on Stack Overflow instead of contacting them.
If that's not possible, is there a way to install EPD any more?
Edit: I realize that this question doesn't really belong to SO. Please migrate it to SU if needed. Thanks.

Categories

Resources