gforsyth / xonda

DEPRECATED: (previously a thin wrapper around conda for xonsh)
BSD 3-Clause "New" or "Revised" License
11 stars 9 forks source link

No bin directory on miniconda 4.3.31, Windows 10 #30

Closed meatballs closed 5 years ago

meatballs commented 6 years ago

When I create conda envs, the path to the python executable is .../miniconda3/envs/<env name> with no 'bin' directory at the end of that path.

However, when I activate that enviroment, xonda is adding.../miniconda3/envs/<env name>/bin to my PATH and so the new environment is unusable.

gforsyth commented 6 years ago

Thanks for reporting @meatballs. That's annoying. I had managed to keep things OS agnostic so far, but perhaps those days are over. I'll test a bit to see if the same is true for OSX and Linux and then update accordingly.

meatballs commented 6 years ago

Just tried putting miniconda back to 4.3.30 in case that was the problem - no change :-(

gforsyth commented 6 years ago

Hey @meatballs -- can you show me a dir or ls inside one of your env directories? I can't understand what's going on here. There should at least be a few more subdirectories and things.

meatballs commented 6 years ago
conda create -n test python=3.6

cd ~\AppData\Local\Continuum\miniconda3\envs\test
ls

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       07/02/2018     08:50                conda-meta
d-----       07/02/2018     08:50                DLLs
d-----       07/02/2018     08:50                include
d-----       07/02/2018     08:50                Lib
d-----       07/02/2018     08:50                Library
d-----       07/02/2018     08:50                libs
d-----       07/02/2018     08:50                Scripts
d-----       07/02/2018     08:50                tcl
d-----       07/02/2018     08:50                Tools
-a----       07/02/2018     08:50              0 .nonadmin
-a----       29/09/2017     10:59          19256 api-ms-win-core-console-l1-1-0.dll
-a----       29/09/2017     10:58          18744 api-ms-win-core-datetime-l1-1-0.dll
-a----       29/09/2017     10:59          18744 api-ms-win-core-debug-l1-1-0.dll
-a----       29/09/2017     10:58          18744 api-ms-win-core-errorhandling-l1-1-0.dll
-a----       29/09/2017     10:58          22328 api-ms-win-core-file-l1-1-0.dll
-a----       29/09/2017     10:58          18744 api-ms-win-core-file-l1-2-0.dll
-a----       29/09/2017     10:58          18744 api-ms-win-core-file-l2-1-0.dll
-a----       29/09/2017     10:58          18744 api-ms-win-core-handle-l1-1-0.dll
-a----       29/09/2017     10:58          19256 api-ms-win-core-heap-l1-1-0.dll
-a----       29/09/2017     10:58          18744 api-ms-win-core-interlocked-l1-1-0.dll
-a----       29/09/2017     10:59          19256 api-ms-win-core-libraryloader-l1-1-0.dll
-a----       29/09/2017     10:59          21304 api-ms-win-core-localization-l1-2-0.dll
-a----       29/09/2017     10:58          19256 api-ms-win-core-memory-l1-1-0.dll
-a----       29/09/2017     10:59          18744 api-ms-win-core-namedpipe-l1-1-0.dll
-a----       29/09/2017     10:58          19768 api-ms-win-core-processenvironment-l1-1-0.dll
-a----       29/09/2017     10:59          20792 api-ms-win-core-processthreads-l1-1-0.dll
-a----       29/09/2017     10:59          19256 api-ms-win-core-processthreads-l1-1-1.dll
-a----       29/09/2017     10:59          18232 api-ms-win-core-profile-l1-1-0.dll
-a----       29/09/2017     10:59          19256 api-ms-win-core-rtlsupport-l1-1-0.dll
-a----       29/09/2017     11:00          18744 api-ms-win-core-string-l1-1-0.dll
-a----       29/09/2017     10:59          20792 api-ms-win-core-synch-l1-1-0.dll
-a----       29/09/2017     10:59          19256 api-ms-win-core-synch-l1-2-0.dll
-a----       29/09/2017     11:00          19768 api-ms-win-core-sysinfo-l1-1-0.dll
-a----       29/09/2017     11:00          18744 api-ms-win-core-timezone-l1-1-0.dll
-a----       29/09/2017     11:00          17856 api-ms-win-core-util-l1-1-0.dll
-a----       29/09/2017     10:59          19768 api-ms-win-crt-conio-l1-1-0.dll
-a----       29/09/2017     10:59          22840 api-ms-win-crt-convert-l1-1-0.dll
-a----       29/09/2017     10:59          19256 api-ms-win-crt-environment-l1-1-0.dll
-a----       29/09/2017     10:59          20792 api-ms-win-crt-filesystem-l1-1-0.dll
-a----       29/09/2017     11:00          19768 api-ms-win-crt-heap-l1-1-0.dll
-a----       29/09/2017     10:59          19256 api-ms-win-crt-locale-l1-1-0.dll
-a----       29/09/2017     10:59          27064 api-ms-win-crt-math-l1-1-0.dll
-a----       29/09/2017     10:59          26936 api-ms-win-crt-multibyte-l1-1-0.dll
-a----       29/09/2017     11:00          71480 api-ms-win-crt-private-l1-1-0.dll
-a----       29/09/2017     10:59          19768 api-ms-win-crt-process-l1-1-0.dll
-a----       29/09/2017     10:59          22464 api-ms-win-crt-runtime-l1-1-0.dll
-a----       29/09/2017     11:00          24888 api-ms-win-crt-stdio-l1-1-0.dll
-a----       29/09/2017     11:00          24888 api-ms-win-crt-string-l1-1-0.dll
-a----       29/09/2017     11:00          21304 api-ms-win-crt-time-l1-1-0.dll
-a----       29/09/2017     11:00          19256 api-ms-win-crt-utility-l1-1-0.dll
-a----       18/03/2016     05:54         334656 concrt140.dll
-a----       19/12/2017     04:53          12757 LICENSE_PYTHON.txt
-a----       18/03/2016     05:54         639808 msvcp140.dll
-a----       16/01/2018     18:25          93696 python.exe
-a----       16/01/2018     18:25         413696 python.pdb
-a----       16/01/2018     18:23          51200 python3.dll
-a----       16/01/2018     18:23        3602432 python36.dll
-a----       16/01/2018     18:23        9187328 python36.pdb
-a----       16/01/2018     18:25          92160 pythonw.exe
-a----       16/01/2018     18:25         413696 pythonw.pdb
-a----       29/09/2017     10:59        1001272 ucrtbase.dll
-a----       18/03/2016     05:54         394568 vccorlib140.dll
-a----       18/03/2016     05:54         185144 vcomp140.dll
-a----       18/03/2016     05:54          89416 vcruntime140.dll

cd Scripts
ls

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----       16/01/2018     18:25             74 2to3-script.py
-a----       12/01/2018     22:03          40960 2to3.exe
-a----       07/02/2018     08:50            100 activate
-a----       07/02/2018     08:50             89 activate.bat
-a----       07/02/2018     08:50             94 conda
-a----       07/02/2018     08:50             86 conda.bat
-a----       07/02/2018     08:50            102 deactivate
-a----       07/02/2018     08:50             91 deactivate.bat
-a----       07/02/2018     08:50            478 easy_install-3.6-script.py
-a----       12/01/2018     21:22          74752 easy_install-3.6.exe
-a----       12/01/2018     21:22            225 easy_install-script.py
-a----       03/01/2018     03:18          40960 easy_install.exe
-a----       16/01/2018     18:25             72 idle-script.py
-a----       12/01/2018     22:03          40960 idle.exe
-a----       27/10/2017     19:19            197 pip-script.py
-a----       17/10/2017     21:27          40960 pip.exe
-a----       16/01/2018     18:25             57 pydoc-script.py
-a----       12/01/2018     22:03          40960 pydoc.exe
-a----       21/11/2017     17:12            204 wheel-script.py
-a----       16/11/2017     02:11          40960 wheel.exe

So, python.exe ends up in the root directory, whilst pip.exe is in Scripts. There's no bin directory at all.

Creating an environment within WSL works as expected with a bin directory containing both python.exe and pip.exe.

meatballs commented 6 years ago

It looks like this by design in Conda. Looking at the activate and activate.bat scripts, they append different paths. If I remove the xonda plugin and simple use 'activate ' it all works fine.

gforsyth commented 6 years ago

Thanks, @meatballs.
Can you do me another favor? (Sorry, no windows box to check these things on) Is there a difference for the value of xonsh.built_ins.ON_WINDOWS if you run in WSL or outside it? I need to know if I can rely on that bool to determine the activate behavior.

meatballs commented 6 years ago

Fortunately, yes, there is!!

It's True outside WSL and False within it.

gforsyth commented 6 years ago

Great. Thanks, @meatballs -- this is going to go a little deeper than I imagined, so I might use it as an excuse to rewrite the whole thing with Pathlib anyway. Hopefully I'll get to it this weekend or next week.