Does `anaconda` create a separate PYTHONPATH variable for each new environment?

Anaconda does not use the PYTHONPATH. One should however note that if the PYTHONPATH is set it could be used to load a library that is not in the anaconda environment. That is why before activating an environment it might be good to do a unset PYTHONPATH For instance this PYTHONPATH points to an incorrect … Read more

Python Anaconda: should I use `conda activate` or `source activate` in linux

As of conda 4.4, conda activate is the preferred way to activate an environment. Generally, you won’t find too much of a difference between conda activate and the old source activate, except that it’s meant to be faster, and work the same across different operating systems (the latter difference makes conda activate a huge improvement … Read more

Set up virtualenv using a requirements.txt generated by conda

I’m setting up a python project, using an Anaconda virtual environment. I was wondering though, when other developers want to contribute to the project, but want to use virtualenv instead of Anaconda, can they do that? Yes – in fact this is how many of my projects are structured. To accomplish what you’re looking for, … Read more

Using multiple Python engines (32Bit/64bit and 2.7/3.5)

Make sure to set the right environmental variables (https://github.com/conda/conda/issues/1744) Create a new environment for 32bit Python 2.7: set CONDA_FORCE_32BIT=1 conda create -n py27_32 python=2.7 Activate it: set CONDA_FORCE_32BIT=1 activate py27_32 Deactivate it: deactivate py27_32 Create one for 64 bit Python 3.5: set CONDA_FORCE_32BIT= conda create -n py35_64 python=3.5 Activate it: set CONDA_FORCE_32BIT= activate py35_64 The … Read more

Anaconda: Permanently include external packages (like in PYTHONPATH)

I found two answers to my question in the Anaconda forum: 1.) Put the modules into into site-packages, i.e. the directory $HOME/path/to/anaconda/lib/pythonX.X/site-packages which is always on sys.path. This should also work by creating a symbolic link. 2.) Add a .pth file to the directory $HOME/path/to/anaconda/lib/pythonX.X/site-packages. This can be named anything (it just must end with … Read more

OpenCV not working properly with python on Linux with anaconda. Getting error that cv2.imshow() is not implemented

1.The easiest way: conda remove opencv conda update conda conda install –channel menpo opencv or (for OpenCV 3.1) : conda install -c menpo opencv3 2.And if u don’t want to do this, you can try to use matplotlib . import cv2 import matplotlib.pyplot as plt img = cv2.imread(‘img.jpg’,0) plt.imshow(img, cmap=’gray’) plt.show() 3.Or try to build … Read more

anaconda – path environment variable in windows

it turns out I was mistaken. Solution is: in anaconda (as well as in other implementations), set the path environment variable to the directory where ‘python.exe’ is installed. As a default, the python.exe file in anaconda is in: c:\…..\anaconda after you do that, obviously, the python command works, in my case, yielding the following. python … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)