Anaconda Python installation is not detected in linux mint - python-2.7

I'm us using Linux Mint 17.1. I have installed Anaconda Python following the installation procedures given in the official webpage of Anaconda, but the linux is not detecting the installation and it uses the default python. Please suggest some thing.

At the end of the Anaconda installation, you are asked
Do you wish the installer to prepend the Anaconda2 install location
to PATH in your /home/muenker/.bashrc ? [yes|no]
Under Linux, the default choice is "no", resulting in a system that doesn't "know" anything about Anaconda. When you type
python
the python interpreter that comes with the Linux distribution is found. You could either:
Choose yes, but that means the Anaconda python is used instead of the default python interpreter which could have some side effects with the operating system
from your home directory call anaconda2/bin/python but this is not very convenient
add the path to the Anaconda bin directory temporarily by using
export PATH=~/anaconda2/bin:$PATH
There is some more info at
[https://askubuntu.com/questions/505919/installing-anaconda-python-on-ubuntu]
Hope that helps!

Related

Do package installed with pip change according to python configuration?

I have a conceptual doubt regarding how Python packages dependencies are installed/configured, this is related to compilation configurations.
Case 1
Installed packages pyscreenshot, image, pillow using pip from a python 2.7 configured with ucs2 in the user lib space (--user). Executed some api to get desktop screenshot, everything runs smoothly.
Case 2
Executed another python 2.7 configured with ucs4, it finds the packages due that those were installed in the user space. Executed same api to get desktop screenshot, it crashes. The ucs4 configuration was incompatible with how the packages works.
So why that happened? could different versions of the same packages be installed depending on how Python was configured?
Note:
ucs2/ucs4 explanation https://docs.python.org/2/c-api/unicode.html
So why that happened?
It happened because when both C (binary) codes were loaded into memory, each one of them treated strings in different ways. In python documentation it is clearly stated that: "... UCS2 and UCS4 Python builds are not binary compatible. Please keep this in mind when writing extensions or interfaces."
Documentation also says that: "Python’s default builds use a 16-bit type for Py_UNICODE and store Unicode values internally as UCS2." So what you did was to: install a package compatible with the default interpreter and run it with a non compatible Python interpreter.
could different versions of the same packages be installed depending on how Python was configured?
I am not sure if pip is able to handle UCS2 and UCS4 package variants. What happens when you install the same packages using the pip from your UCS4 interpreter? If the UCS2 version of the package is installed when using the UCS4 version of pip, I would recommend to download the source distribution of the package and compile it yourself with UCS4.
I know that pip can differentiate between os (windows / linux) and ABI, but I don't think it can handle UCS differences.

Easiest way to have Python 2 and 3 coexist on Mac OSX 10.8 with Anaconda installed

I am using python 2.7.10 with Anaconda 2.3.0, and I use the Anaconda IDE with sublime text 3 (is it a different Anaconda??).
However, for a course I'm taking we're required to use python 3.5.
I would like to keep python 2.7 on my computer, though. What would be the easiest way to have both versions coexist and be easily accessible through the terminal (through sublime would be great, but I'd be happy with managing it on the terminal for now)?
Also, I typically run conda update conda, and conda update anaconda on a regular basis to keep everything up to date. How would that work with different versions of python installed?
This sort of thing is actually what Anaconda is built for. Although the default Python version depends on the installer you used, Anaconda supports both versions. The easiest way is to create a new virtual environment. From the following link, use this conda command to build a Python 3 environment:
conda create -n py35 python=3.5 anaconda
That is if you need Python 3.5 with all the anaconda packages. You can either leave that blank if you just want a vanilla version of Python 3.5, or specify individual packages.
Once you do this, Python 3.5 will be available with the console command py35. You should definitely read the following link about how to manage environments. Really, you should read that whole tutorial.

How can I change the version of python being used by IDLE?

I have both python 2.7 and python 3.4 installed on my mac.
IDLE is using the latter, how can I change that ?
I looked for idle in python2.7 folder under /Library/Python but all I can find under Python2.7 is a folder having the name site-packages.
you may try by changing the system variables....I don't know particularly about mac but in window we can do so.You may refer the following link.
=======================
https://www.youtube.com/watch?v=IX6mc9l6tY4

Unable to import lib tiff after installing Anaconda on Mac OS X 10.9.2

I have developed some software using Python under Windows 7.
I have given it to a colleague to run on a Mac (OS X 10.9.2). I have never used a Mac and am having trouble helping them to get started. I have downloaded and installed Anaconda 1.9.2 on the Mac. According to the continuum documentation, libtiff is included, but when I run my python file using the Spyder IDE I get the following error when it tries to import libtiff:
ImportError: No module named libtiff.
Following one of the answers on Stack Ooverflow, I tried:
conda install libtiff
This runs and returns:
All requested packages already installed.
However on Windows 7 I can see a libtiff folder under \python27\lib\site-packages. On the Mac there is no libtiff folder under /lib/python2.7/site-packages.
Can anyone tell me what I am missing?
This question is answered here:
Installing Python modules with Anaconda or Canopy
If pip install libtiff does not work, you can download the source for PyLibTiff as directed at https://code.google.com/p/pylibtiff/source/checkout and run setup.py with whichever interpreter you would like for PyLibTiff to be installed to.
Also, you do not have to have the the C libraries that Anaconda installs installed for PyLibTiff to work if you have libtiff libraries installed elsewhere.
Unclear on this. But what you can do to begin with is to type echo $PATH from the terminal and see what paths are set. Unclear on how Anaconda interacts with the system, but a good hunch is that if the library file is not in a path then that would cause this.
Also, looking at this thread on Google Groups it seems that Anaconda installs it’s own libraries that might need to be symbolically linked into the main /usr/local/lib directory. The user Denis Engemann—who made the post—posts this bash script in the last response in the thread:
for lib in ~/anaconda/lib/*;
do
ln -s $lib /usr/local/lib/$(basename $lib);
done
I would recommend checking those two directories first before linking to make sure all is as expected.

Trouble Installing PythonMagick Windows 7

I am trying to install PythonMagick. I am using Python 2.7 and running Windows 7. I have tried following the directions in the readme, but all of the configuration scripts are of type "file" and cannot be executed in either the python or windows command line. What should I do?
I recommend you use the pre-compiled installer from the Unofficial Windows Binaries for Python Extension Packages.
Just follow this link and download the right installer for your Python interpreter (in your case it will either be PythonMagick-0.9.10.win-amd64-py2.7.‌exe or PythonMagick-0.9.10.win32-py2.7.‌exe, depending on whether you've installed the 64 or 32 bit Python interpreter).