mandeep / sublime-text-conda

Work with conda environments in Sublime Text 3
BSD 3-Clause "New" or "Revised" License
26 stars 10 forks source link

Create Package not creating package in anaconda3/envs #9

Closed MikeJohnPage closed 5 years ago

MikeJohnPage commented 5 years ago

Using 'Conda: Create Environment' inside the command palette is failing to create the environment in the relevant anaconda directory (/home/usr/anaconda3/envs). Running 'conda env list' in a terminal window also indicates that an environment has not been created. Despite this, using the 'Conda: List Environments' command in Sublime Text shows a newly created environment. However, this environment cannot be removed or activated (using the relevant conda command palette commands) - presumably because it does not exist.

If an environment is created from the command line, it can be selected and activated in Sublime Text using the 'conda:' command palette commands, indicating this issue is one way. Any help fixing this would be appreciated.

I am running Ubuntu 18.04.1 LTS, Sublime Text Build 3176, & conda 4.5.12.

mandeep commented 5 years ago

Hmm, I'm unable to replicate this with ST3 Build 3176 and conda 4.5.12 on Debian 9 testing.

Could you show me the output of the ST3 quick window when you run the Conda: Create Environment command?

This is what mine looks like after selecting Python 3.6 and the environment name subl-test:

Solving environment: ...working... done

## Package Plan ##

  environment location: /home/mandeep/miniconda3/envs/subl-test

  added / updated specs: 
    - python=3.6

The following NEW packages will be INSTALLED:

    ca-certificates: 2018.03.07-0           
    certifi:         2018.11.29-py36_0      
    libedit:         3.1.20170329-h6b74fdf_2
    libffi:          3.2.1-hd88cf55_4       
    libgcc-ng:       8.2.0-hdf63c60_1       
    libstdcxx-ng:    8.2.0-hdf63c60_1       
    ncurses:         6.1-he6710b0_1         
    openssl:         1.1.1a-h7b6447c_0      
    pip:             18.1-py36_0            
    python:          3.6.8-h0371630_0       
    readline:        7.0-h7b6447c_5         
    setuptools:      40.6.3-py36_0          
    sqlite:          3.26.0-h7b6447c_0      
    tk:              8.6.8-hbc83047_0       
    wheel:           0.32.3-py36_0          
    xz:              5.2.4-h14c3975_4       
    zlib:            1.2.11-h7b6447c_3      

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
[Finished in 12.8s]

Once finished I am able to activate and use the environment. The environment also appears in the envs directory.

MikeJohnPage commented 5 years ago

Thanks for getting back to me. Strangely, everything now appears to work (more detail below). Just in case this wasn't a one off error, after creating a test environment called test_env running Python 3.6 I get the following output:

Solving environment: ...working... done

## Package Plan ##

  environment location: /home/mike/anaconda3/envs/test_env

  added / updated specs: 
    - python=3.6

The following NEW packages will be INSTALLED:

    ca-certificates: 2018.03.07-0           
    certifi:         2018.11.29-py36_0      
    libedit:         3.1.20170329-h6b74fdf_2
    libffi:          3.2.1-hd88cf55_4       
    libgcc-ng:       8.2.0-hdf63c60_1       
    libstdcxx-ng:    8.2.0-hdf63c60_1       
    ncurses:         6.1-he6710b0_1         
    openssl:         1.1.1a-h7b6447c_0      
    pip:             18.1-py36_0            
    python:          3.6.8-h0371630_0       
    readline:        7.0-h7b6447c_5         
    setuptools:      40.6.3-py36_0          
    sqlite:          3.26.0-h7b6447c_0      
    tk:              8.6.8-hbc83047_0       
    wheel:           0.32.3-py36_0          
    xz:              5.2.4-h14c3975_4       
    zlib:            1.2.11-h7b6447c_3      

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
[Finished in 4.4s]

However, I am now able to activate/deactivate/build/remove the environment, from either conda in Sublime Text, or from the command line. When I initially posted the issue, I reran the procedure repeatedly, and continually got the same error. Other than restarting the machine since, I cannot think of anything that has changed! Either way, issue solved. Thanks.

mandeep commented 5 years ago

Thanks for the update. What's interesting is that other users have reported bugs that seem to disappear after restarting the machine. It's hard to say if this is an issue with sublime-text-conda, ST3, or conda itself. However, I'll try to dig deeper to see if I can find an apparent cause.