kailaix / ADCME.jl

Automatic Differentiation Library for Computational and Mathematical Engineering
https://kailaix.github.io/ADCME.jl/latest/
MIT License
286 stars 57 forks source link

Error: Error building `ADCME`: #67

Open farzadforouzanfard87 opened 3 years ago

farzadforouzanfard87 commented 3 years ago

┌ Error: Error building ADCME: │ ┌ Warning: Pkg.installed() is deprecated │ └ @ Pkg C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Pkg.jl:554 │ ┌ Warning: Pkg.installed() is deprecated │ └ @ Pkg C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Pkg.jl:554 │ [ Info: Your Julia version is 1.5.3, current ADCME version is 0.5.13, ADCME dependencies installation path: C:\Users\Farzad.julia\adcme │ [ Info: --------------- (1/6) Install Tensorflow Dependencies --------------- │ [ Info: ADCME dependencies have already been installed │ [ Info: --------------- (2/6) Check Python Version --------------- │ ┌ Warning: Pkg.installed() is deprecated │ └ @ Pkg C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Pkg.jl:554 │ Building Conda ─→ C:\Users\Farzad.julia\packages\Conda\x5ml4\deps\build.log │ Building PyCall → C:\Users\Farzad.julia\packages\PyCall\BcTLp\deps\build.log │ ┌ Info: PyCall Python version: C:\Users\Farzad.julia\adcme\python.exe │ └ Conda Python version: C:\Users\Farzad.julia\adcme\python.exe │ [ Info: --------------- (3/6) Looking for TensorFlow Dynamic Libraries --------------- │ ERROR: LoadError: PyError (PyImport_ImportModule │ │ The Python package tensorflow could not be imported by pyimport. Usually this means │ that you did not install tensorflow in the Python version being used by PyCall. │ │ PyCall is currently configured to use the Python version at: │ │ C:\Users\Farzad.julia\adcme\python.exe │ │ and you should use whatever mechanism you usually use (apt-get, pip, conda, │ etcetera) to install the Python package containing the tensorflow module. │ │ One alternative is to re-configure PyCall to use a different Python │ version on your system: set ENV["PYTHON"] to the path/name of the python │ executable you want to use, run Pkg.build("PyCall"), and re-launch Julia. │ │ Another alternative is to configure PyCall to use a Julia-specific Python │ distribution via the Conda.jl package (which installs a private Anaconda │ Python distribution), which has the advantage that packages can be installed │ and kept up-to-date via Julia. As explained in the PyCall documentation, │ set ENV["PYTHON"]="", run Pkg.build("PyCall"), and re-launch Julia. Then, │ To install the tensorflow module, you can use pyimport_conda("tensorflow", PKG), │ where PKG is the Anaconda package the contains the module tensorflow, │ or alternatively you can use the Conda package directly (via │ using Conda followed by Conda.add etcetera). │ │ ) <class 'ImportError'> │ ImportError('\n\nIMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!\n\nImporting the numpy C-extensions failed. This error can happen for\nmany reasons, often due to issues with your setup or how NumPy was\ninstalled.\n\nWe have compiled some common reasons and troubleshooting tips at:\n\n https://numpy.org/devdocs/user/troubleshooting-importerror.html\n\nPlease note and check the following:\n\n The Python version is: Python3.7 from "C:\Users\Farzad\AppData\Local\JuliaPro-1.5.3-1\Julia-1.5.3\bin\julia.exe"\n The NumPy version is: "1.19.1"\n\nand make sure that they are the versions you expect.\nPlease carefully study the documentation linked above for further help.\n\nOriginal error was: DLL load failed: The specified module could not be found.\n') │ File "C:\Users\Farzad.julia\adcme\lib\site-packages\tensorflowinit.py", line 99, in │ from tensorflow_core import * │ File "C:\Users\Farzad.julia\adcme\lib\site-packages\tensorflow_coreinit.py", line 34, in │ from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import │ File "C:\Users\Farzad.julia\adcme\lib\site-packages\tensorflowinit.py", line 50, in getattr │ module = self.load() │ File "C:\Users\Farzad.julia\adcme\lib\site-packages\tensorflow_init.py", line 44, in load │ module = importlib.import_module(self.name) │ File "C:\Users\Farzad.julia\adcme\lib\importlib_init.py", line 127, in import_module │ return bootstrap.gcd_import(name[level:], package, level) │ File "C:\Users\Farzad.julia\adcme\lib\site-packages\tensorflow_core\python_init.py", line 47, in │ import numpy as np │ File "C:\Users\Farzad.julia\adcme\lib\site-packages\numpy_init.py", line 140, in │ from . import core │ File "C:\Users\Farzad.julia\adcme\lib\site-packages\numpy\core_init.py", line 48, in │ raise ImportError(msg) │ │ Stacktrace: │ [1] pyimport(::String) at C:\Users\Farzad.julia\packages\PyCall\BcTLp\src\PyCall.jl:547 │ [2] top-level scope at C:\Users\Farzad.julia\packages\ADCME\JzSON\deps\build.jl:77 │ [3] include(::String) at .\client.jl:457 │ [4] top-level scope at none:5 │ in expression starting at C:\Users\Farzad.julia\packages\ADCME\JzSON\deps\build.jl:77 └ @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:949

farzadforouzanfard87 commented 3 years ago

@kailaix commented yesterday Hello, you had an old installation "current ADCME version is 0.5.13". Could you try the following

Remove the directory C:\Users\Farzad.julia\adcme Reinstall and rebuild ADCME. using ADCME Pkg.build("ADCME") Make sure you have the latest version (0.6.7) (you can use Pkg.status("ADCME") to check.

farzadforouzanfard87 commented 3 years ago

farzadforouzanfard87 commented 22 hours ago Hi kailaix, I did all of your commands, but I get the below error ☹

(@JuliaPro_v1.5.3-1) pkg> add ADCME Updating registry at C:\Users\Farzad.julia\registries\General Updating registry at C:\Users\Farzad.julia\registries\JuliaComputingRegistry Resolving package versions... Installed ADCME ─ v0.6.7 Updating C:\Users\Farzad.julia\environments\JuliaPro_v1.5.3-1\Project.toml [07b341a0] + ADCME v0.6.7 Updating C:\Users\Farzad.julia\environments\JuliaPro_v1.5.3-1\Manifest.toml [07b341a0] + ADCME v0.6.7 [9e28174c] + BinDeps v1.0.2 [a74b3585] + Blosc v0.7.0 [0b7ba130] + Blosc_jll v1.14.3+1 [e1450e63] + BufferedStreams v1.0.0 [631607c0] + CMake v1.2.0 [f67ccb44] + HDF5 v0.13.7 [0234f1f7] + HDF5_jll v1.10.5+7 [5ced341a] + Lz4_jll v1.9.2+2 [23992714] + MAT v0.8.1 Building ADCME → C:\Users\Farzad.julia\packages\ADCME\hCmEo\deps\build.log ┌ Error: Error building ADCME, showing the last 100 of log: wrapt-1.12.1 | 45 KB | ########## | 100% libblas-3.8.0 | 3.5 MB | ########## | 100% opt_einsum-3.3.0 | 51 KB | ########## | 100% ca-certificates-2020 | 184 KB | ########## | 100% google-auth-1.20.1 | 55 KB | ########## | 100% keras-applications-1 | 29 KB | ########## | 100% click-7.1.2 | 64 KB | ########## | 100% cachetools-4.1.1 | 12 KB | ########## | 100% tensorflow-probabili | 1.2 MB | ########## | 100% mkl-service-2.3.0 | 52 KB | ########## | 100% tensorboard-2.3.0 | 6.2 MB | ########## | 100% │ Preparing transaction: ...working... done │ Verifying transaction: ...working... done │ Executing transaction: ...working... done │ │ │ ==> WARNING: A newer version of conda exists. <== │ current version: 4.8.3 │ latest version: 4.9.2 │ │ Please update conda by running │ │ $ conda update -n base -c defaults conda │ │ │ # │ # To activate this environment, use │ # │ # $ conda activate base │ # │ # To deactivate an active environment, use │ # │ # $ conda deactivate │ │ ┌ Warning: Pkg.installed() is deprecated │ └ @ Pkg C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Pkg.jl:554 │ ┌ Warning: Pkg.installed() is deprecated │ └ @ Pkg C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Pkg.jl:554 │ [ Info: Your Julia version is 1.5.3, current ADCME version is 0.6.7, ADCME dependencies installation path: C:\Users\Farzad.julia\adcme │ [ Info: --------------- (1/6) Install Tensorflow Dependencies --------------- │ [ Info: Installing miniconda... │ [ Info: Installing conda dependencies... │ [ Info: --------------- (2/6) Check Python Version --------------- │ ┌ Warning: Pkg.installed() is deprecated │ └ @ Pkg C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Pkg.jl:554 │ Building Conda ─→ C:\Users\Farzad.julia\packages\Conda\x5ml4\deps\build.log │ Building PyCall → C:\Users\Farzad.julia\packages\PyCall\BcTLp\deps\build.log │ ┌ Info: PyCall Python version: C:\Users\Farzad.julia\adcme\python.exe │ └ Conda Python version: C:\Users\Farzad.julia\adcme\python.exe │ [ Info: --------------- (3/6) Looking for TensorFlow Dynamic Libraries --------------- │ ERROR: LoadError: PyError (PyImport_ImportModule │ │ The Python package tensorflow could not be imported by pyimport. Usually this means │ that you did not install tensorflow in the Python version being used by PyCall. │ │ PyCall is currently configured to use the Python version at: │ │ C:\Users\Farzad.julia\adcme\python.exe │ │ and you should use whatever mechanism you usually use (apt-get, pip, conda, │ etcetera) to install the Python package containing the tensorflow module. │ │ One alternative is to re-configure PyCall to use a different Python │ version on your system: set ENV["PYTHON"] to the path/name of the python │ executable you want to use, run Pkg.build("PyCall"), and re-launch Julia. │ │ Another alternative is to configure PyCall to use a Julia-specific Python │ distribution via the Conda.jl package (which installs a private Anaconda │ Python distribution), which has the advantage that packages can be installed │ and kept up-to-date via Julia. As explained in the PyCall documentation, │ set ENV["PYTHON"]="", run Pkg.build("PyCall"), and re-launch Julia. Then, │ To install the tensorflow module, you can use pyimport_conda("tensorflow", PKG), │ where PKG is the Anaconda package the contains the module tensorflow, │ or alternatively you can use the Conda package directly (via │ using Conda followed by Conda.add etcetera). │ │ ) <class 'ImportError'> │ ImportError('\n\nIMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!\n\nImporting the numpy C-extensions failed. This error can happen for\nmany reasons, often due to issues with your setup or how NumPy was\ninstalled.\n\nWe have compiled some common reasons and troubleshooting tips at:\n\n https://numpy.org/devdocs/user/troubleshooting-importerror.html\n\nPlease note and check the following:\n\n The Python version is: Python3.7 from "C:\Users\Farzad\AppData\Local\JuliaPro-1.5.3-1\Julia-1.5.3\bin\julia.exe"\n The NumPy version is: "1.19.1"\n\nand make sure that they are the versions you expect.\nPlease carefully study the documentation linked above for further help.\n\nOriginal error was: DLL load failed: The specified module could not be found.\n') │ File "C:\Users\Farzad.julia\adcme\lib\site-packages\tensorflowinit.py", line 99, in │ from tensorflow_core import * │ File "C:\Users\Farzad.julia\adcme\lib\site-packages\tensorflow_coreinit.py", line 34, in │ from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import │ File "C:\Users\Farzad.julia\adcme\lib\site-packages\tensorflowinit.py", line 50, in getattr │ module = self.load() │ File "C:\Users\Farzad.julia\adcme\lib\site-packages\tensorflow_init.py", line 44, in load │ module = importlib.import_module(self.name) │ File "C:\Users\Farzad.julia\adcme\lib\importlib_init.py", line 127, in import_module │ return bootstrap.gcd_import(name[level:], package, level) │ File "C:\Users\Farzad.julia\adcme\lib\site-packages\tensorflow_core\python_init.py", line 47, in │ import numpy as np │ File "C:\Users\Farzad.julia\adcme\lib\site-packages\numpy_init.py", line 140, in │ from . import core │ File "C:\Users\Farzad.julia\adcme\lib\site-packages\numpy\core_init.py", line 48, in │ raise ImportError(msg) │ │ Stacktrace: │ [1] pyimport(::String) at C:\Users\Farzad.julia\packages\PyCall\BcTLp\src\PyCall.jl:547 │ [2] top-level scope at C:\Users\Farzad.julia\packages\ADCME\hCmEo\deps\build.jl:77 │ [3] include(::String) at .\client.jl:457 │ [4] top-level scope at none:5 │ in expression starting at C:\Users\Farzad.julia\packages\ADCME\hCmEo\deps\build.jl:77 │ │ Full log at C:\Users\Farzad.julia\packages\ADCME\hCmEo\deps\build.log └ @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:949

farzadforouzanfard87 commented 3 years ago

@kailaix commented 15 hours ago • What is the output of

$ C:\Users\Farzad.julia\adcme\python.exe

import tensorflow

farzadforouzanfard87 commented 3 years ago

farzadforouzanfard87 commented 14 hours ago Dear kailai, here is the output of your above command:

import tensorflow Traceback (most recent call last): File "C:\Users\Farzad.julia\adcme\lib\site-packages\numpy\coreinit.py", line 22, in from . import multiarray File "C:\Users\Farzad.julia\adcme\lib\site-packages\numpy\core\multiarray.py", line 12, in from . import overrides File "C:\Users\Farzad.julia\adcme\lib\site-packages\numpy\core\overrides.py", line 7, in from numpy.core._multiarray_umath import ( ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "C:\Users\Farzad.julia\adcme\lib\site-packages\tensorflowinit.py", line 99, in from tensorflow_core import * File "C:\Users\Farzad.julia\adcme\lib\site-packages\tensorflow_coreinit.py", line 34, in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "C:\Users\Farzad.julia\adcme\lib\site-packages\tensorflowinit.py", line 50, in getattr module = self.load() File "C:\Users\Farzad.julia\adcme\lib\site-packages\tensorflow_init.py", line 44, in load module = importlib.import_module(self.name) File "C:\Users\Farzad.julia\adcme\lib\importlib_init.py", line 127, in import_module return bootstrap.gcd_import(name[level:], package, level) File "C:\Users\Farzad.julia\adcme\lib\site-packages\tensorflow_core\python_init.py", line 47, in import numpy as np File "C:\Users\Farzad.julia\adcme\lib\site-packages\numpy_init.py", line 140, in from . import core File "C:\Users\Farzad.julia\adcme\lib\site-packages\numpy\core_init.py", line 48, in raise ImportError(msg) ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html Please note and check the following:

The Python version is: Python3.7 from "C:\Users\Farzad.julia\adcme\python.exe" The NumPy version is: "1.19.1" and make sure that they are the versions you expect. Please carefully study the documentation linked above for further help.

Original error was: DLL load failed: The specified module could not be found.

farzadforouzanfard87 commented 3 years ago

@kailaix commented 11 hours ago It looks like your NumPy DLL was not loaded. Could you try

$ C:\Users\Farzad.julia\adcme\python.exe import numpy

farzadforouzanfard87 commented 3 years ago

farzadforouzanfard87 commented 10 hours ago import numpy Traceback (most recent call last): File "C:\Users\Farzad.julia\adcme\lib\site-packages\numpy\coreinit.py", line 22, in from . import multiarray File "C:\Users\Farzad.julia\adcme\lib\site-packages\numpy\core\multiarray.py", line 12, in from . import overrides File "C:\Users\Farzad.julia\adcme\lib\site-packages\numpy\core\overrides.py", line 7, in from numpy.core._multiarray_umath import ( ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "C:\Users\Farzad.julia\adcme\lib\site-packages\numpyinit.py", line 140, in from . import core File "C:\Users\Farzad.julia\adcme\lib\site-packages\numpy\coreinit.py", line 48, in raise ImportError(msg) ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html Please note and check the following:

The Python version is: Python3.7 from "C:\Users\Farzad.julia\adcme\python.exe" The NumPy version is: "1.19.1" and make sure that they are the versions you expect. Please carefully study the documentation linked above for further help.

Original error was: DLL load failed: The specified module could not be found.

farzadforouzanfard87 commented 3 years ago

@kailaix commented 7 hours ago I think the problem is with your numpy installation. Could you try reinstall numpy using

C:\Users\Farzad.julia\adcme\Scripts\pip.exe install -U numpy and retry import numpy?

farzadforouzanfard87 commented 3 years ago

farzadforouzanfard87 commented 31 minutes ago I think the problem is with your numpy installation. Could you try reinstall numpy using

C:\Users\Farzad.julia\adcme\Scripts\pip.exe install -U numpy and retry import numpy?

julia@DESKTOP-0RUTMSV:~$ /mnt/c/Users/Farzad/.julia/adcme/Scripts/pip.exe install --trusted-host pypi.org --trusted-host files.pythonhosted.org numpy WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Requirement already satisfied: numpy in c:\users\farzad.julia\adcme\lib\site-packages (1.19.1)

farzadforouzanfard87 commented 3 years ago

@jiaqiwang969

Hi, @kailaix , the Same problem I have met, and as you suggested, with "install -U numpy": @farzadforouzanfard87 C:\Users\wjq>C:\Users\wjq.julia\adcme\Scripts\pip.exe install -U numpy WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/numpy/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/numpy/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/numpy/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/numpy/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/numpy/ Could not fetch URL https://pypi.org/simple/numpy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/numpy/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping Requirement already up-to-date: numpy in c:\users\wjq.julia\adcme\lib\site-packages (1.19.1) WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴

hi @jiaqiwang969 , i solve this issue by using the below command :

pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org

for example in my Windows Subsystem for Linux :

julia@DESKTOP-0RUTMSV:~$ /mnt/c/Users/Farzad/.julia/adcme/Scripts/pip.exe install --trusted-host pypi.org --trusted-host files.pythonhosted.org numpy

🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴

but dear @kailaix , after reinstall numy , in JuliaPro , Pkg.build("ADCME") not work and the same error occurs as I mentioned in my first post ☹☹☹☹

kailaix commented 3 years ago

Hi, I guess the reason is that import numpy is trying to use DLLs from another numpy installation. Following the instruction here, I suggest you activate your ADCME conda environment and try importing numpy (the same for Linux/OSX)

$ C:\Users\Farzad\.julia\adcme\Scripts\conda.bat activate
(base) $ python
>>> import numpy
farzadforouzanfard87 commented 3 years ago

Hi, I guess the reason is that import numpy is trying to use DLLs from another numpy installation. Following the instruction here, I suggest you activate your ADCME conda environment and try importing numpy (the same for Linux/OSX)

$ C:\Users\Farzad\.julia\adcme\Scripts\conda.bat activate
(base) $ python
>>> import numpy

Dear @kailaix , i solve this problem by doing two tasks:

1-in visual studio 2017: install "Desktop development with C++"

2-set an extra set of PATH environment variables:

C:\Users\Farzad.julia\adcme\Library\bin C:\Users\Farzad.julia\adcme\ C:\Users\Farzad\AppData\Local\atom\bin

and then run Pkg.build("ADCME") and all of the things installed appropriately and then run test ADCME and test passed without error.

Thanks for your commands, ADCME installed on my JuliaPro successfully.

and now I have a new issue with installing AdFem.jl package that I post on AdFem.jl issue page.

jiaqiwang969 commented 3 years ago

Hi, I guess the reason is that import numpy is trying to use DLLs from another numpy installation. Following the instruction here, I suggest you activate your ADCME conda environment and try importing numpy (the same for Linux/OSX)

$ C:\Users\Farzad\.julia\adcme\Scripts\conda.bat activate
(base) $ python
>>> import numpy

Dear @kailaix , i solve this problem by doing two tasks:

1-in visual studio 2017: install "Desktop development with C++"

2-set an extra set of PATH environment variables:

C:\Users\Farzad.julia\adcme\Library\bin C:\Users\Farzad.julia\adcme C:\Users\Farzad\AppData\Local\atom\bin

and then run Pkg.build("ADCME") and all of the things installed appropriately and then run test ADCME and test passed without error.

Thanks for your commands, ADCME installed on my JuliaPro successfully.

and now I have a new issue with installing AdFem.jl package that I post on AdFem.jl issue page.

Thanks, it also works for me! But there still some warnings: julia> using ADCME [ Info: Precompiling ADCME [07b341a0-ce75-57c6-b2de-414ffdc00be5] WARNING: Method definition size(PyCall.PyObject) in module PyCall at C:\Users\wjq.julia\packages\PyCall\tqyST\src\PyCall.jl:809 overwritten in module ADCME at C:\Users\wjq.julia\packages\ADCME\hCmEo\src\variable.jl:214. incremental compilation may be fatally broken for this module

WARNING: Method definition length(PyCall.PyObject) in module PyCall at C:\Users\wjq.julia\packages\PyCall\tqyST\src\PyCall.jl:808 overwritten in module ADCME at C:\Users\wjq.julia\packages\ADCME\hCmEo\src\variable.jl:238. incremental compilation may be fatally broken for this module

WARNING: Method definition lastindex(PyCall.PyObject) in module PyCall at deprecated.jl:70 overwritten in module ADCME at C:\Users\wjq.julia\packages\ADCME\hCmEo\src\variable.jl:454. incremental compilation may be fatally broken for this module

WARNING: Method definition *(PyCall.PyObject, PyCall.PyObject) in module PyCall at C:\Users\wjq.julia\packages\PyCall\tqyST\src\pyoperators.jl:11 overwritten in module ADCME at C:\Users\wjq.julia\packages\ADCME\hCmEo\src\ops.jl:102. incremental compilation may be fatally broken for this module

┌ Warning: Cannot load C:\Users\wjq.julia\packages\ADCME\hCmEo\deps\CustomOps\build\adcme.dll. Please recompile the shared library by ADCME.precompile() for using custom operators. └ @ ADCME C:\Users\wjq.julia\packages\ADCME\hCmEo\src\ADCME.jl:76

kailaix commented 3 years ago

No worries about the warning. It will disappear next time when you use ADCME. However, you need to run ADCME.precompile() so that you can use custom operators.

jiaqiwang969 commented 3 years ago

No worries about the warning. It will disappear next time when you use ADCME. However, you need to run ADCME.precompile() so that you can use custom operators.

julia> using ADCME ┌ Warning: Cannot load C:\Users\wjq.julia\packages\ADCME\hCmEo\deps\CustomOps\build\adcme.dll. Please recompile the shared library by ADCME.precompile() for using custom operators. └ @ ADCME C:\Users\wjq.julia\packages\ADCME\hCmEo\src\ADCME.jl:76

julia> ADCME.precompile() [ Info: Changed to directory build CMake Error at CMakeLists.txt:2 (project): Generator

Visual Studio 15 2017

could not find any instance of Visual Studio.

-- Configuring incomplete, errors occurred! See also "C:/Users/wjq/.julia/packages/ADCME/hCmEo/deps/CustomOps/build/CMakeFiles/CMakeOutput.log". ERROR: failed process: Process(setenv('C:\Users\wjq\.julia\packages\CMake\ULbyn\deps\usr\bin\cmake.exe' '-GVisual Studio 15' '-DJULIA=C:\Users\wjq\AppData\Local\Programs\Julia 1.5.3\bin\julia' -A x64 '' 'C:\Users\wjq\.julia\packages\ADCME\hCmEo\deps\CustomOps\',["HDF5_USE_FILE_LOCKING=FALSE", "PATH=C:\Program Files\Parallels\Parallels Tools\Applications;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\SysWOW64\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;C:\Users\wjq\AppData\Local\Microsoft\WindowsApps;C:\Users\wjq\AppData\Local\atom\bin;C:\Users\wjq\.julia\adcme;C:\Users\wjq\.julia\adcme\Library\bin;C:\Users\wjq\.julia\adcme\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE;C:\Users\wjq\.dotnet\tools;C:\Users\wjq\.julia\adcme\lib\site-packages\numpy\.libs:C:\Users\wjq\.julia\adcme\lib\Libraries\lib", "USERDOMAIN_ROAMINGPROFILE=WJQ4C70", "KMP_AFFINITY=granularity=fine,verbose,compact,1,0", "HOMEPATH=\Users\wjq", "PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC", "SESSIONNAME=Console", "SYSTEMROOT=C:\Windows", "APPDATA=C:\Users\wjq\AppData\Roaming", "PSMODULEPATH=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules" … "COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files", "VS150COMNTOOLS=/c/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/Tools", "COMMONPROGRAMFILES=C:\Program Files\Common Files", "PROGRAMFILES(X86)=C:\Program Files (x86)", "PROGRAMFILES=C:\Program Files", "LOGONSERVER=\\WJQ4C70", "DRIVERDATA=C:\Windows\System32\Drivers\DriverData", "SYSTEMDRIVE=C:", "PROCESSOR_ARCHITECTURE=AMD64", "OPENBLAS_MAIN_FREE=1"]), ProcessExited(1)) [1]

Stacktrace: [1] pipeline_error at .\process.jl:525 [inlined] [2] run(::Cmd; wait::Bool) at .\process.jl:440 [3] run at .\process.jl:438 [inlined] [4] cmake(::String; CMAKE_ARGS::String) at C:\Users\wjq.julia\packages\ADCME\hCmEo\src\extra.jl:71 [5] cmake at C:\Users\wjq.julia\packages\ADCME\hCmEo\src\extra.jl:52 [inlined] (repeats 2 times) [6] #241 at C:\Users\wjq.julia\packages\ADCME\hCmEo\src\extra.jl:331 [inlined] [7] require_cmakecache(::ADCME.var"#241#243", ::String) at C:\Users\wjq.julia\packages\ADCME\hCmEo\src\toolchain.jl:335 [8] require_cmakecache at C:\Users\wjq.julia\packages\ADCME\hCmEo\src\toolchain.jl:320 [inlined] [9] precompile(::Bool) at C:\Users\wjq.julia\packages\ADCME\hCmEo\src\extra.jl:330 [10] precompile() at C:\Users\wjq.julia\packages\ADCME\hCmEo\src\extra.jl:318

😭

kailaix commented 3 years ago

@jiaqiwang969 This error is due to a lack of a compatible compiler. Have you followed the instructions here? You need to install Microsoft Visual Studio 15 compiler (remember to enable desktop development with c++ in your installation) and configure the environment variables as shown in the instruction.