Can clone conda (without admin), but cannot activate it - python

I am using Anaconda in a server. The environment default is c:\anaconda.
I have no admin privilege, so I cannot apply 'conda install gdal'.
The program suggests cloning the environment.
I have cloned it.
When I type
conda env list
My environment is shwon correctly.
However, when I
deactivate
And try to
activate mine
Conda says there is no such environment...
Anybody?
Thanks.

Related

how to use existing conda environment as a AzureML environment

I have created a Azure Compute target and using the notebooks from it. I want to create a conda environment using Notebook Terminal and install my own packages and use it in AzureML experiment environment.
I had the same question and the answer can be found here: https://learn.microsoft.com/en-us/azure/machine-learning/how-to-access-terminal#add-new-kernels
The basic steps are:
Create your conda environment with the terminal
Activate the environment
conda install pip
conda install ipykernel
python -m ipykernel install --user --name newenv --display-name "Python (newenv)"
After reloading the portal you can select the kernel in the list.
Fist make sure we install conda using Notebook Terminal.
We can create an environment from existing conda environment. This make it easy to reuse your local interactive environment in Azure ML remote runs. For example, if we've created conda environment using
conda create -n mycondaenv
We can create Azure ML environment out of that conda environment using
myenv = Environment.from_existing_conda_environment(name="myenv", conda_environment_name="mycondaenv")

Create Conda Environment by Connecting to Existing Environment

I have Anaconda installed on a server. I have a conda environment on a NAS. The conda environment is not visible to the Anaconda installation, because it was created with a different installation on a different server.
Is it possible to "create" a conda environment from my Anaconda installation that would actually bypass creation and just point to the existing environment on the NAS? This would be similar to using the --fake method in Django to connect to existing tables when a model is migrated.
You can either add the location of the directory containing the environments to your conda config, which tells conda where to "look" for environments, or you can just activate the environment directly by passing the path.
Assuming your your NAS is mapped to a drive letter (such as Z:) and your conda environment is located at Z:/conda/envs/my_env, then you can add that location to your conda configuration via:
conda config --append envs_dirs Z:/conda/envs
Now when you can activate the environment using:
conda activate my_env
If you have another environment named my_env in a different directory, it will be first in the order.
Alternatively, you can activate the environment directly by passing the path.
conda activate Z:/conda/envs/my_env

Cannot activate virtual environment on virtual studio

I am using Visual Studio Code and have Anaconda downloaded so i selected it as my path interpreter.
I am able to download virtualenv using pip install virtualenv and then instantiate it using virtualenv env.
The issue occurs when I try to activate the environment using activate env or conda activate env.
Error message returned: Could not find conda environment: env. I then proceeded to look into my directory and I see that the environment is included as a folder so I'm confused on why I cannot activate it. For reference I am using Windows.
Edit: Originally the environment was not appearing in my users/.conda/environments file but using conda create --name venv I was able to create a new environment here. However, it doesn't instantiate in my current directory. Thoughts?
conda virtual environments are not interchangeable with virtualenv virtual environments. If you have created a virtual environment in your current dir. The ps command would be .\Scripts\activate

Trouble using pyenv and anaconda environments

I'm using pyenv to manage my python environments. One of the environments is anaconda with multiple environments.
There are two ways to activate a conda environment while everything is handled by pyenv.
Load the conda environment directly with pyenv as pyenv local anaconda3-2019.10/env/myenv
Load the main conda and then activate the local environment pyenv local anaconda3-2019.10; conda activate myenv
Both methods fail one way or another:
In the first method, conda command cannot be used to install any more modules as it says command not found
In the second method, the conda activate fails, complaining about the shell: CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. Configuring the shell ruins all the environments by changing .zshrc which is global
I can use pip to install packages but the whole point of using anaconda is to use the nice package managing environment
Have I set something wrong or is this some sort of bug?

Conda fails to set up paths when activating an environment

I am using miniconda 4.5.1 on 4.13.0-37-generic GNU/Linux
I am also using tmux, if that's useful.
When I activate my environment by running source activate ___
conda fails to set up the paths, meaning my python and pip commands are still mapped to the conda regular (or whatever the name is) python commands, not those from my environment. I get the (env-name) tag before my terminal prompt, as though it has been activated.
I have to activate, then deactivate, then reactivate, to force this to happen, using the following commands:
source activate envname
source deactivate
source activate envname
Any clue as to why this might be happening? Thanks!

Categories

Resources