I was using virtualenv all the time and then I had also installed anaconda. Just now I tried to activate a virtual environment using the way of anaconda like source ac
It's not clear from your question what you expect "activate" to do. Is it activating a virtualenv, or is it activating a conda environment.
When you install miniconda or anaconda, you are given an option to add it to PATH. If you do so, then it probably always comes before your virtualenv activate script. You can rename one or the other, or create an alias to the virtualenv one that calls it with an absolute path to the activate script. You can also move Anaconda so that it's appended rather than prepended, but then the virtualenv activate will always be used rather than the conda one (barring absolute paths).
To append conda's path, look in ~/.bashrc or ~/.bash_profile and change
export PATH=<anaconda path>:$PATH
to
export PATH=$PATH:<anaconda path>