when I use following ways to update ,there is some problem, system told me “missing header for unified diff at line 1 of patch
cd theano/scan_module/ cython scan_perform.pyx patch scan_perform.c numpy_api_changes.diff
by the way, the reason I want to update is that when I used theano in windows anaconda environment, system told me “UserWarning: The file scan_perform.c is not available. This donot happen normally.” I find the above method at:https://github.com/Theano/Theano/blob/master/theano/scan_module/scan_perform_ext.py then use following ways install patch command
conda install patch
how to solve this problem?
Answer
I was able to disable this warning by following these steps:
- Go to the releases page of Theano, click on the commit hash corresponding to the version of Theano you have installed, and then on “Browse Files”. In my case, since I have Theano 1.0.3, I used the hash
65fefc3
. Navigate to
theano/scan_module/c_code
in the github repo (corresponding to this URL in my case), and download the contents of the filescan_perform.c
into a file with the same name.Go to wherever the Theano source files are located in your machine. In my case since I was using anaconda they were in:
/home/<username>/miniconda3/envs/<env_name>/lib/python2.7/site-packages/theano
Once there, navigate to the
scan_module
directory, create a directory calledc_code
, andcd
into it.Paste the
scan_perform.c
file you just downloaded into this directory.
When executing Theano again you shouldn’t see the warning anymore.