Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError: [WinError 2] The system cannot find the file specified #331

Closed
malev opened this issue Feb 23, 2015 · 14 comments · Fixed by #723
Closed

FileNotFoundError: [WinError 2] The system cannot find the file specified #331

malev opened this issue Feb 23, 2015 · 14 comments · Fixed by #723
Labels
locked [bot] locked due to inactivity

Comments

@malev
Copy link

malev commented Feb 23, 2015

I have an error when I'm trying to build a meta recipe in Windows.

BUILD START: anaconda-notebook-2.4-py34_0
Removing old work directory
Copying C:\Users\builder\Documents\GitHub\anaconda-notebook to C:\Users\builder\Miniconda3\conda-bld\work
There was an error importing jinja2.
Please run `conda install jinja2` to enable jinja template support
Package: anaconda-notebook-2.4-py34_0
source tree in: C:\Users\builder\Miniconda3\conda-bld\work
An unexpected error has occurred, please consider sending the
following traceback to the conda GitHub issue tracker at:

    https://github.com/conda/conda-build/issues

Include the output of the command 'conda info' in your report.


Traceback (most recent call last):
  File "C:\Users\builder\Miniconda3\Scripts\conda-build-script.py", line 4, in <module>
    sys.exit(main())
  File "C:\Users\builder\Miniconda3\lib\site-packages\conda_build\main_build.py", line 110, in main
    args_func(args, p)
  File "C:\Users\builder\Miniconda3\lib\site-packages\conda_build\main_build.py", line 312, in args_func
    args.func(args, p)
  File "C:\Users\builder\Miniconda3\lib\site-packages\conda_build\main_build.py", line 272, in execute
    build.build(m, verbose=not args.quiet, post=post)
  File "C:\Users\builder\Miniconda3\lib\site-packages\conda_build\build.py", line 365, in build
    windows.build(m)
  File "C:\Users\builder\Miniconda3\lib\site-packages\conda_build\windows.py", line 95, in build
    env.update(environ.get_dict(m))
  File "C:\Users\builder\Miniconda3\lib\site-packages\conda_build\environ.py", line 94, in get_dict
    d.update(**get_git_build_info(d['SRC_DIR']))
  File "C:\Users\builder\Miniconda3\lib\site-packages\conda_build\environ.py", line 47, in get_git_build_info
    env=env)
  File "C:\Users\builder\Miniconda3\lib\subprocess.py", line 858, in __init__
    restore_signals, start_new_session)
  File "C:\Users\builder\Miniconda3\lib\subprocess.py", line 1111, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
PS C:\Users\builder\Documents\GitHub\anaconda-notebook> conda info
Current conda install:

             platform : win-64
        conda version : 3.9.0
  conda-build version : 1.10.2
       python version : 3.4.2.final.0
     requests version : 2.5.1
     root environment : C:\Users\builder\Miniconda3  (writable)
  default environment : C:\Users\builder\Miniconda3
     envs directories : C:\Users\builder\Miniconda3\envs
        package cache : C:\Users\builder\Miniconda3\pkgs
         channel URLs : https://conda.binstar.org/javascript/win-64/
                        https://conda.binstar.org/javascript/noarch/
                        http://repo.continuum.io/pkgs/free/win-64/
                        http://repo.continuum.io/pkgs/free/noarch/
                        http://repo.continuum.io/pkgs/pro/win-64/
                        http://repo.continuum.io/pkgs/pro/noarch/
          config file : C:\Users\builder\.condarc
    is foreign system : False
@duncanwp
Copy link

duncanwp commented Jan 6, 2016

Does anyone have a workaround for this - it's stopping me building anything on Windows...

@msarahan
Copy link
Contributor

msarahan commented Jan 6, 2016

Do you have jinja2 installed? The traceback above seems to show that it is missing, but it is a requirement of the current conda build version. Please try

conda update conda-build

Which should bring in jinja 2 if you lack it.

@duncanwp
Copy link

duncanwp commented Jan 6, 2016

Yes, I have jinja2 installed and conda-build looks up to date:

C:\Users\duncan\conda-recipes>conda list
# packages in environment at C:\Users\duncan\Anaconda:
#
_license                  1.1                      py27_0    <unknown>
alabaster                 0.7.3                    py27_0    <unknown>
anaconda                  2.3.0                np19py27_0    <unknown>
anaconda-client           1.0.2                    py27_0    defaults
argcomplete               0.9.0                    py27_0    defaults
astropy                   1.0.4                np19py27_0    defaults
babel                     1.3                      py27_0    <unknown>
backports.ssl-match-hostname 3.4.0.2                   <pip>
bcolz                     0.10.0               np19py27_0    defaults
beautiful-soup            4.3.2                    py27_1    <unknown>
beautifulsoup4            4.3.2                     <pip>
binstar                   0.12                          2    defaults
bitarray                  0.8.1                    py27_1    <unknown>
blaze                     0.8.2                     <pip>
blaze-core                0.8.2                np19py27_0    defaults
blz                       0.6.2                np19py27_1    <unknown>
bokeh                     0.9.3                np19py27_0    defaults
boto                      2.38.0                   py27_0    <unknown>
bottleneck                1.0.0                np19py27_0    <unknown>
cdecimal                  2.3                      py27_1    <unknown>
certifi                   14.05.14                 py27_0    <unknown>
cffi                      1.1.2                    py27_0    defaults
clyent                    0.4.0                    py27_0    defaults
colorama                  0.3.3                    py27_0    <unknown>
comtypes                  1.1.2                    py27_0    defaults
conda                     3.19.0                   py27_0    defaults
conda-build               1.18.2                   py27_0    defaults
conda-env                 2.4.5                    py27_0    defaults
configobj                 5.0.6                    py27_0    <unknown>
cryptography              0.9.3                    py27_0    defaults
cython                    0.23.2                   py27_0    defaults
cytoolz                   0.7.3                    py27_0    <unknown>
datashape                 0.4.6                np19py27_0    defaults
decorator                 4.0.2                    py27_0    defaults
docutils                  0.12                     py27_1    <unknown>
dynd-python               0.6.5                np19py27_0    <unknown>
enum34                    1.0.4                    py27_0    <unknown>
fastcache                 1.0.2                    py27_0    <unknown>
flask                     0.10.1                   py27_1    <unknown>
funcsigs                  0.4                      py27_0    <unknown>
gevent                    1.0.1                    py27_0    <unknown>
gevent-websocket          0.9.3                    py27_0    <unknown>
greenlet                  0.4.7                    py27_0    <unknown>
grin                      1.2.1                    py27_2    <unknown>
h5py                      2.5.0                np19py27_2    defaults
hdf5                      1.8.15.1                      2    <unknown>
idna                      2.0                      py27_0    <unknown>
ipaddress                 1.0.7                    py27_0    <unknown>
ipykernel                 4.0.3                    py27_0    defaults
ipython                   4.0.0                    py27_0    defaults
ipython-genutils          0.1.0                     <pip>
ipython-notebook          4.0.4                    py27_0    defaults
ipython-qtconsole         4.0.1                    py27_0    defaults
ipython_genutils          0.1.0                    py27_0    defaults
itsdangerous              0.24                     py27_0    <unknown>
jdcal                     1.0                      py27_0    <unknown>
jedi                      0.9.0                    py27_0    defaults
jinja2                    2.8                      py27_0    defaults
jsonschema                2.4.0                    py27_0    <unknown>
jupyter-client            4.0.0                     <pip>
jupyter-core              4.0.4                     <pip>
jupyter_client            4.0.0                    py27_0    defaults
jupyter_core              4.0.4                    py27_0    defaults
launcher                  1.0.0                         1    <unknown>
llvmlite                  0.7.0                    py27_5    defaults
lxml                      3.4.4                    py27_0    <unknown>
markupsafe                0.23                     py27_0    <unknown>
matplotlib                1.4.3                np19py27_1    <unknown>
menuinst                  1.3.1                    py27_0    defaults
mistune                   0.7.1                    py27_0    defaults
mock                      1.3.0                    py27_0    defaults
msvc_runtime              1.0.1                     vc9_0  [vc9]  defau
multipledispatch          0.4.8                    py27_0    defaults
nbconvert                 4.0.0                    py27_0    defaults
nbformat                  4.0.0                    py27_0    defaults
networkx                  1.10                     py27_0    defaults
nltk                      3.0.5                    py27_0    defaults
node-webkit               0.10.1                        0    <unknown>
nose                      1.3.7                    py27_0    <unknown>
notebook                  4.0.4                    py27_0    defaults
numba                     0.21.0               np19py27_0    defaults
numexpr                   2.4.3                np19py27_0    <unknown>
numpy                     1.9.2                    py27_0    <unknown>
odo                       0.3.3                np19py27_0    defaults
openpyxl                  2.0.2                    py27_0    defaults
pandas                    0.16.2               np19py27_0    <unknown>
patch                     2.5.9                         1    defaults
path.py                   7.6.1                    py27_0    defaults
patsy                     0.4.0                np19py27_0    defaults
pbr                       1.3.0                    py27_0    defaults
pep8                      1.6.2                    py27_0    <unknown>
pickleshare               0.5                      py27_0    defaults
pillow                    2.9.0                    py27_0    defaults
pip                       7.1.2                    py27_0    defaults
ply                       3.6                      py27_0    <unknown>
psutil                    3.2.2                    py27_0    defaults
py                        1.4.30                   py27_0    defaults
pyasn1                    0.1.7                    py27_0    <unknown>
pycosat                   0.6.1                    py27_0    <unknown>
pycparser                 2.14                     py27_0    <unknown>
pycrypto                  2.6.1                    py27_3    <unknown>
pyflakes                  0.9.2                    py27_0    <unknown>
pygments                  2.0.2                    py27_0    <unknown>
pyopenssl                 0.15.1                   py27_1    <unknown>
pyparsing                 2.0.3                    py27_0    <unknown>
pyqt                      4.10.4                   py27_1    <unknown>
pyreadline                2.0                      py27_0    <unknown>
pytables                  3.2.1.1              np19py27_0    defaults
pytest                    2.7.2                    py27_0    defaults
python                    2.7.11                        0    defaults
python-dateutil           2.4.2                    py27_0    <unknown>
pytz                      2015.4                   py27_0    <unknown>
pywin32                   219                      py27_0    <unknown>
pyyaml                    3.11                     py27_2    defaults
pyzmq                     14.7.0                   py27_0    <unknown>
qtconsole                 4.0.1                    py27_0    defaults
requests                  2.9.0                    py27_0    defaults
rope                      0.9.4                    py27_1    <unknown>
runipy                    0.1.3                    py27_0    <unknown>
scikit-image              0.11.3               np19py27_0    <unknown>
scikit-learn              0.16.1               np19py27_0    <unknown>
scipy                     0.16.0               np19py27_0    defaults
setuptools                19.1.1                   py27_0    defaults
simplegeneric             0.8.1                    py27_0    defaults
singledispatch            3.4.0.3                  py27_0    defaults
six                       1.9.0                    py27_0    <unknown>
snowballstemmer           1.2.0                    py27_0    <unknown>
sockjs-tornado            1.0.1                    py27_0    <unknown>
sphinx                    1.3.1                    py27_0    <unknown>
sphinx-rtd-theme          0.1.7                     <pip>
sphinx_rtd_theme          0.1.7                    py27_0    <unknown>
spyder                    2.3.6                    py27_0    defaults
spyder-app                2.3.6                    py27_0    defaults
sqlalchemy                1.0.8                    py27_0    defaults
ssl_match_hostname        3.4.0.2                  py27_0    <unknown>
statsmodels               0.6.1                np19py27_0    <unknown>
sympy                     0.7.6.1                  py27_0    defaults
tables                    3.2.1.1                   <pip>
toolz                     0.7.4                    py27_0    defaults
tornado                   4.2.1                    py27_0    defaults
traitlets                 4.0.0                    py27_0    defaults
ujson                     1.33                     py27_0    <unknown>
unicodecsv                0.13.0                   py27_0    defaults
werkzeug                  0.10.4                   py27_0    <unknown>
wheel                     0.26.0                   py27_1    defaults
xlrd                      0.9.4                    py27_0    defaults
xlsxwriter                0.7.3                    py27_0    <unknown>
xlwings                   0.4.0                    py27_0    defaults
xlwt                      1.0.0                    py27_0    <unknown>
zlib                      1.2.8                         0    <unknown>

There appears to be a fix against the associated issue: #474 but it's not been pulled in yet.

@duncanwp
Copy link

duncanwp commented Jan 6, 2016

Thanks for getting back to me though - any help would be appreciated.

@msarahan
Copy link
Contributor

msarahan commented Jan 6, 2016

Thanks. I will review that PR quickly and either merge it or fix the issue otherwise.

@duncanwp
Copy link

duncanwp commented Jan 6, 2016

Awesome - thanks!

@msarahan
Copy link
Contributor

msarahan commented Jan 9, 2016

This should now be fixed in master. We will work on a release soon.

@duncanwp
Copy link

That's great, thanks for taking a look at this. Now you know what the issue was do you have any suggestions for a quick workaround? Would a reinstall of conda work?

@msarahan
Copy link
Contributor

The quickest workaround would be to go in and manually apply the change from https://github.com/conda/conda-build/pull/723/files to your installed conda-build source code.

@duncanwp
Copy link

I've tried folding in that pull request but it doesn't seem to fix the issue I'm seeing above. Apologies but it looks like I may have conflated two different issues.

The one above is coming out of main_build.py and seems to be git related. Could it be a problem with not finding git? I have git bash installed, but I've tried pointing my recipe to a local path and it still gives the same stack, any thoughts?

@msarahan
Copy link
Contributor

Is git on PATH? Bear in mind that some variables are set in a way that does not persist to subprocesses. You need the path to git.exe to be persistent in subprocesses. One way to test this would be simply:

import subprocess
subprocess.check_call("git --version")

or, if using git bash, what happens if you type "bash" at your prompt - is git still in your PATH?

@duncanwp
Copy link

Yes, that was the problem after all - sorry for the confusion...!

@msarahan
Copy link
Contributor

No problem - thanks for digging up that other PR. It needed attention, anyway.

@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically locked because it has not had recent activity after being closed.

Please open a new issue if needed.

Thanks!

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Apr 24, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants