Anaconda Environment: jupiter= argument being ignored - anaconda

I am creating an Anaconda environment and want to use jupyter=1.0.0 but this argument is ignored. By ignored I mean that the library is not added to the environment once created. No error is given. Am I not fully understanding something?
conda create -n python=3.8 scipy=1.5.0 jupyter=1.0.0
This command results in the following:
# $ conda create --name <env> --file <this file>
# platform: linux-64
_libgcc_mutex=0.1=main
_openmp_mutex=4.5=1_gnu
blas=1.0=mkl
ca-certificates=2022.4.26=h06a4308_0
certifi=2021.10.8=py37h06a4308_2
intel-openmp=2022.0.1=h06a4308_3633
ld_impl_linux-64=2.35.1=h7274673_9
libffi=3.3=he6710b0_2
libgcc-ng=9.3.0=h5101ec6_17
libgfortran-ng=7.5.0=ha8ba4b0_17
libgfortran4=7.5.0=ha8ba4b0_17
libgomp=9.3.0=h5101ec6_17
libstdcxx-ng=9.3.0=hd4cf53a_17
mkl=2020.2=256
mkl-service=2.3.0=py37he8ac12f_0
mkl_fft=1.3.0=py37h54f3939_0
mkl_random=1.1.1=py37h0573a6f_0
ncurses=6.3=h7f8727e_2
numpy=1.19.2=py37h54aff64_0
numpy-base=1.19.2=py37hfa32c7d_0
openssl=1.1.1n=h7f8727e_0
pip=21.2.2=py37h06a4308_0
python=3.7.13=h12debd9_0
readline=8.1.2=h7f8727e_1
scipy=1.5.0=py37h0b6359f_0
setuptools=61.2.0=py37h06a4308_0
six=1.16.0=pyhd3eb1b0_1
sqlite=3.38.3=hc218d9a_0
tk=8.6.11=h1ccaba5_0
wheel=0.37.1=pyhd3eb1b0_0
xz=5.2.5=h7f8727e_1
zlib=1.2.12=h7f8727e_2
The python and scipy versions are seen above but NOTHING for jupyter.

Related

PermissionError: [WinError 5] Access is denied pytest after conda install

PermissionError: [WinError 5] Access is denied - running pytest after fresh conda install
Environment
# packages in environment at C:\Users\rick\miniconda3\envs\xml:
#
# Name Version Build Channel
pytest 6.2.2 py39haa95532_2
(xml) c:\Users\rick>conda info
active environment : xml
active env location : C:\Users\rick\miniconda3\envs\xml
shell level : 2
user config file : C:\Users\rick\.condarc
populated config files : C:\Users\rick\.condarc
conda version : 4.9.2
conda-build version : not installed
python version : 3.9.2.final.0
virtual packages : __win=0=0
__archspec=1=x86_64
base environment : C:\Users\rick\miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Users\rick\miniconda3\pkgs
C:\Users\rick\.conda\pkgs
C:\Users\rick\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\rick\miniconda3\envs
C:\Users\rick\.conda\envs
C:\Users\rick\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.9.2 requests/2.25.1 CPython/3.9.2 Windows/10 Windows/10.0.18362
administrator : False
netrc file : None
offline mode : False
(xml) c:\Users\rick>pytest
=================================================== test session starts ===================================================
platform win32 -- Python 3.9.2, pytest-6.2.2, py-1.9.0, pluggy-0.13.1
rootdir: c:\Users\rick
collected 0 items / 1 error
========================================================= ERRORS ==========================================================
______________________________________________ ERROR collecting test session ______________________________________________
miniconda3\envs\xml\lib\site-packages\_pytest\runner.py:311: in from_call
result: Optional[TResult] = func()
miniconda3\envs\xml\lib\site-packages\_pytest\runner.py:341: in <lambda>
call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
miniconda3\envs\xml\lib\site-packages\_pytest\main.py:690: in collect
for direntry in visit(str(argpath), self._recurse):
miniconda3\envs\xml\lib\site-packages\_pytest\pathlib.py:613: in visit
yield from visit(entry.path, recurse)
miniconda3\envs\xml\lib\site-packages\_pytest\pathlib.py:613: in visit
yield from visit(entry.path, recurse)
miniconda3\envs\xml\lib\site-packages\_pytest\pathlib.py:613: in visit
yield from visit(entry.path, recurse)
miniconda3\envs\xml\lib\site-packages\_pytest\pathlib.py:598: in visit
for entry in os.scandir(path):
E PermissionError: [WinError 5] Access is denied: 'c:\\Users\\rick\\AppData\\Local\\Application Data'
================================================= short test summary info =================================================
ERROR - PermissionError: [WinError 5] Access is denied: 'c:\\Users\\rick\\AppData\\Local\\Application Data'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
==================================================== 1 error in 2.35s =====================================================
From a Microsoft Technet post
The Application Data folder in that location is not a normal folder. It is a folder Junction and is normally hidden, by default. The only reason that the junction exists is to redirect legacy applications, that are hard coded to look for that folder, to the new location in Windows 7.
Seems odd that pytest would point to a deprecated "folder junction"? How to resolve?
pytest first tries to 'collect' tests - i.e. scans actual folder and its subfolders for python test files containing tests methods.
Looks like you've just installed (conda and) pytest and wanted to just try it, while being located at your os \users\rick folder, containing additional hidden\protected os folders which pytest lack permissions to access. I don't think pytest is deliberately trying to use this deprecated 'folder junction' ,it just happened to sit around your actual working folder at the moment. Running tests for real, you would know where to collect them, i.e. what folder to execute pytest from. For verify install only, run pytest from folder not containing any special os folders.
Collecting tests is also called 'test discovery' and can be parametrized and or configured, pytest docs touching the topic is here https://docs.pytest.org/en/7.0.x/explanation/goodpractices.html#test-discovery
)
Just run "pytest" from the directory you installed it or add it to the environmental variables.
In your example: >cd miniconda3\envs\xml\lib\site-packages_pytest

Why am I now getting a conda environment error every time I open new terminal?

I have been working on creating custom environments using conda for new projects on my local machine (mac os). Within a project directory I created a new environment using yml file with:
$ conda env create --prefix ./env --file environment.yml
then:
$ conda activate ./env
I am now getting a conda error report every time I open a terminal and I do not understand what is going on. If anyone has any insight on what I broke and how to fix it would be greatly appreciated. I hope I have included enough information here to understand the problem. Here is the error output from terminal:
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/Users/jrudd/opt/anaconda3/lib/python3.8/site-packages/conda/cli/main.py", line 140, in main
return activator_main()
File "/Users/jrudd/opt/anaconda3/lib/python3.8/site-packages/conda/activate.py", line 1210, in main
print(activator.execute(), end='')
File "/Users/jrudd/opt/anaconda3/lib/python3.8/site-packages/conda/activate.py", line 178, in execute
return getattr(self, self.command)()
File "/Users/jrudd/opt/anaconda3/lib/python3.8/site-packages/conda/activate.py", line 152, in activate
builder_result = self.build_activate(self.env_name_or_prefix)
File "/Users/jrudd/opt/anaconda3/lib/python3.8/site-packages/conda/activate.py", line 300, in build_activate
return self._build_activate_stack(env_name_or_prefix, False)
File "/Users/jrudd/opt/anaconda3/lib/python3.8/site-packages/conda/activate.py", line 326, in _build_activate_stack
conda_prompt_modifier = self._prompt_modifier(prefix, conda_default_env)
File "/Users/jrudd/opt/anaconda3/lib/python3.8/site-packages/conda/activate.py", line 691, in _prompt_modifier
return context.env_prompt.format(
KeyError: 'ds-basic'
`$ /Users/jrudd/opt/anaconda3/bin/conda shell.posix activate base`
environment variables:
CIO_TEST=<not set>
CONDA_EXE=/Users/jrudd/opt/anaconda3/bin/conda
CONDA_PYTHON_EXE=/Users/jrudd/opt/anaconda3/bin/python
CONDA_ROOT=/Users/jrudd/opt/anaconda3
CONDA_SHLVL=0
CURL_CA_BUNDLE=<not set>
PATH=/Users/jrudd/opt/anaconda3/bin:/Users/jrudd/opt/anaconda3/condabin:/us
r/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : None
shell level : 0
user config file : /Users/jrudd/.condarc
populated config files : /Users/jrudd/.condarc
conda version : 4.9.2
conda-build version : 3.18.11
python version : 3.8.3.final.0
virtual packages : __osx=10.16=0
__unix=0=0
__archspec=1=x86_64
base environment : /Users/jrudd/opt/anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /Users/jrudd/opt/anaconda3/pkgs
/Users/jrudd/.conda/pkgs
envs directories : /Users/jrudd/opt/anaconda3/envs
/Users/jrudd/.conda/envs
platform : osx-64
user-agent : conda/4.9.2 requests/2.24.0 CPython/3.8.3 Darwin/20.3.0 OSX/10.16
UID:GID : 501:20
netrc file : /Users/jrudd/.netrc
offline mode : False
An unexpected error has occurred. Conda has prepared the above report.
If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers?
Thanks!
So, I found out that I had screwed up the .condarc config file by changing the base env_prompt to ({ds-basic}). For context, ds-basic is the name of this project environment. Don't ask me why or how I did this because I really have no idea. Was probably something I did during coffee induced haze. I found the .condarc file and edited out the offending code. It had actually broke conda completely and I couldn't even activate the base environment. Once I fixed the .condarc file all was well.

how to create a custom python environment from yml file *with* downloads of missing packages

I am trying to build a python 3.5 environment that supports an old hddm library. Standard approaches fail due to my/anaconda's apparent inability in ignore (or downgrade) the 10.1 cuda library in favor of an older one that works with hddm.
There is a yml file available that describes a successful environment. But the advertised command
conda env create -file hddm_py35.yml
fails with an error listing all of the packages "not found." Here are the errors.
(base) PS C:\Users\Peter\anaconda3_Sep2020> conda env create --file .\hddm_py35.yml
Collecting package metadata (repodata.json): done
Solving environment: failed
ResolvePackageNotFound:
odo==0.5.0=py35_1
cffi==1.7.0=py35_0
dill==0.2.5=py35_0
singledispatch==3.4.0.3=py35_0
nb_conda_kernels==2.0.0=py35_0
requests==2.14.2=py35_0
scikit-learn==0.17.1=np111py35_1
wheel==0.29.0=py35_0
jedi==0.9.0=py35_1
widgetsnbextension==1.2.6=py35_0
bitarray==0.8.1=py35_1
theano==1.0.2=py35_0
pytz==2016.6.1=py35_0
pylint==1.5.4=py35_1
ruamel_yaml==0.11.14=py35_0
partd==0.3.6=py35_0
llvmlite==0.13.0=py35_0
multipledispatch==0.4.8=py35_0
pyparsing==2.1.4=py35_0
console_shortcut==0.1.1=py35_1
ipython_genutils==0.1.0=py35_0
patsy==0.4.1=py35_0
pytest==2.9.2=py35_0
heapdict==1.0.0=py35_1
ipywidgets==5.2.2=py35_0
bokeh==0.12.2=py35_0
hdf5==1.8.15.1=2
networkx==1.11=py35_0
backports==1.0=py35_0
pyasn1==0.1.9=py35_0
pyqt==5.6.0=py35h6538335_6
zlib==1.2.11=hbb18732_2
et_xmlfile==1.0.1=py35_0
traitlets==4.3.0=py35_0
colorama==0.3.7=py35_0
argcomplete==1.0.0=py35_1
pywin32==220=py35_1
astropy==1.2.1=np111py35_0
nose==1.3.7=py35_1
freetype==2.8=h0224ed4_1
pkginfo==1.3.2=py35_0
cloudpickle==0.2.1=py35_0
sqlalchemy==1.0.13=py35_0
lazy-object-proxy==1.2.1=py35_0
markupsafe==0.23=py35_2
prompt_toolkit==1.0.3=py35_0
pickleshare==0.7.4=py35_0
itsdangerous==0.24=py35_0
babel==2.3.4=py35_0
click==6.6=py35_0
six==1.10.0=py35_0
libdynd==0.7.2=0
jdcal==1.2=py35_1
pymc==2.3.6=np111py35_2
pathlib2==2.1.0=py35_0
astroid==1.4.7=py35_0
numba==0.28.1=np111py35_0
qtconsole==4.2.1=py35_2
wrapt==1.10.6=py35_0
idna==2.1=py35_0
pytables==3.2.2=np111py35_4
_nb_ext_conf==0.3.0=py35_0
dynd-python==0.7.2=py35_0
numexpr==2.6.1=np111py35_0
werkzeug==0.11.11=py35_0
rope==0.9.4=py35_1
jupyter_client==4.4.0=py35_0
pyzmq==15.4.0=py35_0
python-dateutil==2.5.3=py35_0
beautifulsoup4==4.5.1=py35_0
blaze==0.10.1=py35_0
nbformat==4.1.0=py35_0
nbpresent==3.0.2=py35_0
sip==4.18=py35_0
chest==0.2.3=py35_0
glob2==0.5=py35_0
locket==0.2.0=py35_1
mistune==0.7.3=py35_0
alabaster==0.7.9=py35_0
setuptools==27.2.0=py35_1
win_unicode_console==0.5=py35_0
filelock==2.0.6=py35_0
_license==1.1=py35_1
ipykernel==4.5.0=py35_0
qt==5.6.2=vc14h6f76a7e_12
pep8==1.7.0=py35_0
xlwings==0.10.0=py35_0
spyder==3.0.0=py35_0
xlrd==1.0.0=py35_0
scipy==0.18.1=np111py35_0
dask==0.11.0=py35_0
nbconvert==4.2.0=py35_0
pip==8.1.2=py35_0
mkl==11.3.3=1
nb_anacondacloud==1.2.0=py35_0
cython==0.24.1=py35_0
flask-cors==2.1.2=py35_0
ipython==5.1.0=py35_0
cycler==0.10.0=py35_0
jpeg==9b=he27b436_2
menuinst==1.4.1=py35_0
anaconda==4.2.0=np111py35_0
configobj==5.0.6=py35_0
boto==2.42.0=py35_0
unicodecsv==0.14.1=py35_0
scikit-image==0.12.3=np111py35_1
contextlib2==0.5.3=py35_0
conda-build==3.0.19=py35h15d37ab_0
jinja2==2.8=py35_1
conda-verify==2.0.0=py35_0
get_terminal_size==1.0.0=py35_0
qtpy==1.1.2=py35_0
anaconda-client==1.5.1=py35_0
decorator==4.0.10=py35_0
ply==3.9=py35_0
openpyxl==2.3.2=py35_0
sockjs-tornado==1.0.3=py35_0
pyyaml==3.12=py35_0
snowballstemmer==1.2.1=py35_0
toolz==0.8.0=py35_0
py==1.4.31=py35_0
xlwt==1.1.2=py35_0
clyent==1.2.2=py35_0
bottleneck==1.1.0=np111py35_0
jupyter==1.0.0=py35_3
mkl-service==1.1.2=py35_2
simplegeneric==0.8.1=py35_1
wcwidth==0.1.7=py35_0
h5py==2.6.0=np111py35_2
gevent==1.1.2=py35_0
pycrypto==2.6.1=py35_4
datashape==0.5.2=py35_0
psutil==4.3.1=py35_0
nltk==3.2.1=py35_0
jsonschema==2.5.1=py35_0
notebook==4.2.3=py35_0
pycparser==2.14=py35_1
xlsxwriter==0.9.3=py35_0
jupyter_core==4.2.0=py35_0
qtawesome==0.3.3=py35_0
fastcache==1.0.2=py35_1
jupyter_console==5.0.0=py35_0
tornado==4.4.1=py35_0
path.py==8.2.1=py35_0
pyflakes==1.3.0=py35_0
sympy==1.0=py35_0
pandas==0.20.1=np111py35_0
pygments==2.1.3=py35_0
anaconda-clean==1.0.0=py35_0
mpmath==0.19=py35_1
comtypes==1.1.2=py35_0
cryptography==1.5=py35_0
chardet==3.0.4=py35_0
entrypoints==0.2.2=py35_0
sphinx==1.4.6=py35_0
greenlet==0.4.10=py35_0
anaconda-navigator==1.3.1=py35_0
flask==0.11.1=py35_0
pyopenssl==16.2.0=py35_0
lxml==3.6.4=py35_0
icu==58.2=h3fcc66b_1
docutils==0.12=py35_2
statsmodels==0.6.1=np111py35_1
nb_conda==2.0.0=py35_0
imagesize==0.7.1=py35_0
(base) PS C:\Users\Peter\anaconda3_Sep2020>
The failure occurred within seconds. I get the feeling that conda didn't even try to look for these packages!?!?
Am I supposed to download these packages, put them somewhere, and then tell conda to find them on my hard drive?
Is there a flag that tells conda to do its usually find-and-load for all "missing" packages -- but only in the environment I'm describing? In my base environment (3.8) I don't wish to downgrade.
Should make a new 3.5 environment and then work through the list one-by-one and uninstall/remove/downgrade each package by hand?
Meta question: This must be a FAQ, and yet I'm not able to google for the answer. That usually means googling for "conda install environment from yaml file" doesn't contain the appropriate vocabulary for, well, trying to induce conda to install an environment from a yaml file. What question should I have asked?
1) Am I supposed to download these packages, put them somewhere, and then
tell conda to find them on my hard drive?
Not necessary. But searching for the versions on anaconda.org helps identify channels for one-by-one manual download.
2) Is there a flag that tells conda to do its usually find-and-load for all
"missing" packages -- but only in the environment I'm describing? In my base
environment (3.8) I don't wish to downgrade.
There is no evidence that conda will automatically download files listed in a yaml file that are missing in the present environment.
3) Should make a new 3.5 environment and then work through the list one-by-
one and uninstall/remove/downgrade each package by hand?
Yes.
4) Meta question: This must be a FAQ, and yet I'm not able to google for the
answer. That usually means googling for "conda install environment from yaml
file" doesn't contain the appropriate vocabulary for, well, trying to induce
conda to install an environment from a yaml file. What question should I have
asked?
There is no evidence that yaml files are anything other than lists of version of packages in an environment. They cannot be used to make new environments (unless all of the components are already present in the host environment, maybe) so their value is largely annotative. Evidently.
For the case of making an environment for hddm in 2020, well, don't try. Cuda support will work against you. There is a hddm host at https://colab.research.google.com/ that is properly configured (without cuda disruption) so that you can use it to kick tires, etc. Getting hddm to work in any other context probably requires dedicated hardware so that the cuda driver can be manipulated for this application only and not break any other applications in the process.

How to deal with "[Errno 122] Disk quota exceeded" problem when creating new environment by anaconda?

I am trying to create a new environment for Python through Anaconda. But the error keeps coming out saying :
Solving environment: failed
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
OSError: [Errno 122] Disk quota exceeded
I am using the sentence below to create the new environment:
conda create --name cpost python=2.7 numpy=1.9
I understand that this might be related to the working directory, which is really limited in disk quota. So I copied the Anaconda directory fully to a larger disk-quota directory, and tried to create again. The same error came out. As I checked the error information, I noticed the following lines:
$ /nuist/u/home/liangxz/anaconda3/bin/conda create --name cpost python=2.7 numpy=1.9`
environment variables:
CIO_TEST=<not set>
CONDA_ROOT=/nuist/u/home/liangxz/anaconda3
MODULEPATH=/nuist/p/public/app/Modules/modulefiles/app:/nuist/p/public/app/Module
s/modulefiles/compiler:/nuist/p/public/app/Modules/modulefiles/lib:/nu
ist/p/public/app/Modules/modulefiles/mpi
PATH=/nuist/u/home/liangxz/anaconda3/bin:/nuist/p/public/intel/compilers_an
d_libraries_2018.0.128/linux/bin/intel64:/nuist/p/public/intel/compile
rs_and_libraries_2018.0.128/linux/mpi/intel64/bin:/nuist/p/public/pgi/
linux86-64/17.10/bin:/nuist/p/public/pgi/linux86-64/17.10/bin:/opt/xca
t/bin:/opt/xcat/sbin:/opt/xcat/share/xcat/tools:/usr/lib64/qt-3.3/bin:
/opt/confluent/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/
opt/ibutils/bin:/usr/lpp/mmfs/bin:/root/bin:/opt/pbs/default/bin:/nuis
t/u/home/liangxz/.local/bin:/nuist/u/home/liangxz/bin
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : None
user config file : /nuist/u/home/liangxz/.condarc
populated config files :
conda version : 4.5.4
conda-build version : 3.10.5
python version : 3.6.5.final.0
base environment : /nuist/u/home/liangxz/anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/linux-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/pro/linux-64
https://repo.anaconda.com/pkgs/pro/noarch
package cache : /nuist/u/home/liangxz/anaconda3/pkgs
/nuist/u/home/liangxz/.conda/pkgs
envs directories : /nuist/u/home/liangxz/anaconda3/envs
/nuist/u/home/liangxz/.conda/envs
platform : linux-64
user-agent : conda/4.5.4 requests/2.18.4 CPython/3.6.5 Linux/3.10.0-514.el7.x86_64 centos/7 glibc/2.17
UID:GID : 1135:1135
netrc file : None
offline mode : False
I realized that the "user config file" is /nuist/u/home/liangxz/.condarc, and the "base environment" is "/nuist/u/home/liangxz/anaconda3 (writable)", which means even I copied an anaconda to a larger quota directory, the "writable directory" did not change and remained the small quota directory.(/nuist/u/home/liangxz/ is the small quota directory)
So my question here is how can I change the "base environments" and "envs directories" to the desired larger quota directory? Can I change it directly through some fixings? Or I must install Anaconda again in the bigger directory?
Try following this official anaconda answer that enables adding different directories as your conda cache. I added a different directory where I had more space available and it solved the issue.
I solved this by deleting some of my conda environments. You can find all environments by typing conda env list in the terminal. This will show all environments with their names and paths. Select an environment that you are prepared to remove and type: rm -r <<Path to that environment>>.
Warning: This will delete that environment permanently, so choose wisely.

Buildkite Windows agent cannot find git executable

I'm having trouble getting the Windows build agent to run a build. The agent is unable to checkout my source code. (Im using Windows 10) See GitHub issue
I am seeing the following error when running a build:
Buildkite Error: There was an error running `git clone -v -- git#github.com:myorg/myrepo.git .` (exec: "git": executable file not found in %PATH%)
I have installed git using chocolatey and git is accessible in CMD and Powershell on the agent's host and I can see it in my path if I run gci env:Path in Powershell. git's directory is at the end here:
C:\Program Files\Docker\Docker\Resources\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cm...
From a build's logs in BK's web UI, I see the following environment variables printed out:
BUILDKITE=true
BUILDKITE_AGENT_ACCESS_TOKEN=xxx
BUILDKITE_AGENT_DEBUG=true
BUILDKITE_AGENT_ENDPOINT=https://agent.buildkite.com/v3
BUILDKITE_AGENT_ID=xxx
BUILDKITE_AGENT_NAME=DESKTOP-1
BUILDKITE_AGENT_PID=5180
BUILDKITE_ARTIFACT_PATHS=
BUILDKITE_BIN_PATH=C:\Users\Jason\Downloads\buildkite-agent-windows-amd64-3.0-beta.27
BUILDKITE_BRANCH=fix/build
BUILDKITE_BUILD_CHECKOUT_PATH=builds\DESKTOP-1\myorg\myrepo
BUILDKITE_BUILD_CREATOR=Jason
BUILDKITE_BUILD_CREATOR_EMAIL=myemail#gmail.com
BUILDKITE_BUILD_ID=xxx
BUILDKITE_BUILD_NUMBER=18
BUILDKITE_BUILD_PATH=builds
BUILDKITE_BUILD_URL=https://buildkite.com/myorg/myrepo/builds/18
BUILDKITE_COMMAND=msbuild
BUILDKITE_COMMAND_EVAL=true
BUILDKITE_COMMIT=HEAD
BUILDKITE_GIT_CLEAN_FLAGS=-fxdq
BUILDKITE_GIT_CLONE_FLAGS=-v
BUILDKITE_HOOKS_PATH=hooks
BUILDKITE_JOB_ID=xxx
BUILDKITE_MESSAGE=First build
BUILDKITE_ORGANIZATION_SLUG=myorg
BUILDKITE_PIPELINE_DEFAULT_BRANCH=master
BUILDKITE_PIPELINE_PROVIDER=github
BUILDKITE_PIPELINE_SLUG=myrepo
BUILDKITE_PLUGINS_PATH=plugins
BUILDKITE_PROJECT_PROVIDER=github
BUILDKITE_PROJECT_SLUG=myorg/myrepo
BUILDKITE_PULL_REQUEST=false
BUILDKITE_PULL_REQUEST_REPO=
BUILDKITE_REPO=git#github.com:myorg/myrepo.git
BUILDKITE_REPO_SSH_HOST=github.com
BUILDKITE_RETRY_COUNT=0
BUILDKITE_SCRIPT_PATH=msbuild
BUILDKITE_SOURCE=ui
BUILDKITE_SSH_FINGERPRINT_VERIFICATION=true
BUILDKITE_TAG=
BUILDKITE_TIMEOUT=false
CI=true
PATH=C:\Users\Jason\Downloads\buildkite-agent-windows-amd64-3.0-beta.27;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL
Note that PATH in that output is not the same as my PATH from the Powershell and does not include the path to gits binary.
Full build output:
Build environment variables 0s
BUILDKITE=true
BUILDKITE_AGENT_ACCESS_TOKEN=xxx
BUILDKITE_AGENT_DEBUG=true
BUILDKITE_AGENT_ENDPOINT=https://agent.buildkite.com/v3
BUILDKITE_AGENT_ID=xxx
BUILDKITE_AGENT_NAME=DESKTOP-1
BUILDKITE_AGENT_PID=5180
BUILDKITE_ARTIFACT_PATHS=
BUILDKITE_BIN_PATH=C:\Users\Jason\Downloads\buildkite-agent-windows-amd64-3.0-beta.27
BUILDKITE_BRANCH=fix/build
BUILDKITE_BUILD_CHECKOUT_PATH=builds\DESKTOP-1\myorg\myrepo
BUILDKITE_BUILD_CREATOR=Jason
BUILDKITE_BUILD_CREATOR_EMAIL= myemail#gmail.com
BUILDKITE_BUILD_ID=xxx
BUILDKITE_BUILD_NUMBER=18
BUILDKITE_BUILD_PATH=builds
BUILDKITE_BUILD_URL=https://buildkite.com/myorg/myrepo/builds/18
BUILDKITE_COMMAND=msbuild
BUILDKITE_COMMAND_EVAL=true
BUILDKITE_COMMIT=HEAD
BUILDKITE_GIT_CLEAN_FLAGS=-fxdq
BUILDKITE_GIT_CLONE_FLAGS=-v
BUILDKITE_HOOKS_PATH=hooks
BUILDKITE_JOB_ID=xxx
BUILDKITE_MESSAGE=First build
BUILDKITE_ORGANIZATION_SLUG=myorg
BUILDKITE_PIPELINE_DEFAULT_BRANCH=master
BUILDKITE_PIPELINE_PROVIDER=github
BUILDKITE_PIPELINE_SLUG=myrepo
BUILDKITE_PLUGINS_PATH=plugins
BUILDKITE_PROJECT_PROVIDER=github
BUILDKITE_PROJECT_SLUG=myorg/myrepo
BUILDKITE_PULL_REQUEST=false
BUILDKITE_PULL_REQUEST_REPO=
BUILDKITE_REPO=git#github.com:myorg/myrepo.git
BUILDKITE_REPO_SSH_HOST=github.com
BUILDKITE_RETRY_COUNT=0
BUILDKITE_SCRIPT_PATH=msbuild
BUILDKITE_SOURCE=ui
BUILDKITE_SSH_FINGERPRINT_VERIFICATION=true
BUILDKITE_TAG=
BUILDKITE_TIMEOUT=false
CI=true
PATH=C:\Users\Jason\Downloads\buildkite-agent-windows-amd64-3.0-beta.27;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL
Running global environment hook 0s
# Skipping, no hook script found at "hooks\environment.bat"
Running global pre-checkout hook 0s
# Skipping, no hook script found at "hooks\pre-checkout.bat"
Preparing build directory 0s
# Changing working directory to "builds\DESKTOP-1\myorg\myrepo"
⚠ Buildkite Warning: Could not performn `ssh-keygen` (exec: "ssh-keygen": executable file not found in %PATH%)
> git clone -v -- git#github.com:myorg/myrepo.git .
🚨 Buildkite Error: There was an error running `git clone -v -- git#github.com:myorg/myrepo.git .` (exec: "git": executable file not found in %PATH%)
Your build output doesn't seem to have those chocolatey paths:
PATH=C:\Users\Jason\Downloads\buildkite-agent-windows-amd64-3.0-beta.27;
You might need to add an agent environment hook which adds the right directories to the path. Or try updating to the latest beta which might fix the issue.

Resources