-
Notifications
You must be signed in to change notification settings - Fork 57
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
Error: Error building ADCME
:
#67
Comments
@kailaix commented yesterday Remove the directory C:\Users\Farzad.julia\adcme |
farzadforouzanfard87 commented 22 hours ago ⛔ (@JuliaPro_v1.5.3-1) pkg> add ADCME |
@kailaix commented 15 hours ago • $ C:\Users\Farzad.julia\adcme\python.exe import tensorflow |
farzadforouzanfard87 commented 14 hours ago import tensorflow During handling of the above exception, another exception occurred: Traceback (most recent call last): IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the numpy C-extensions failed. This error can happen for We have compiled some common reasons and troubleshooting tips at: https://numpy.org/devdocs/user/troubleshooting-importerror.html The Python version is: Python3.7 from "C:\Users\Farzad.julia\adcme\python.exe" Original error was: DLL load failed: The specified module could not be found. |
@kailaix commented 11 hours ago $ C:\Users\Farzad.julia\adcme\python.exe |
farzadforouzanfard87 commented 10 hours ago During handling of the above exception, another exception occurred: IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the numpy C-extensions failed. This error can happen for We have compiled some common reasons and troubleshooting tips at: https://numpy.org/devdocs/user/troubleshooting-importerror.html The Python version is: Python3.7 from "C:\Users\Farzad.julia\adcme\python.exe" Original error was: DLL load failed: The specified module could not be found. |
@kailaix commented 7 hours ago C:\Users\Farzad.julia\adcme\Scripts\pip.exe install -U numpy |
farzadforouzanfard87 commented 31 minutes ago C:\Users\Farzad.julia\adcme\Scripts\pip.exe install -U numpy julia@DESKTOP-0RUTMSV:~$ /mnt/c/Users/Farzad/.julia/adcme/Scripts/pip.exe install --trusted-host pypi.org --trusted-host files.pythonhosted.org numpy |
Hi, @kailaix , the Same problem I have met, and as you suggested, with "install -U numpy": 🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴 hi @jiaqiwang969 , i solve this issue by using the below command : pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org <package_name> 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 ☹☹☹☹ |
Hi, I guess the reason is that
|
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 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! 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. 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. 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. ┌ Warning: Cannot load C:\Users\wjq.julia\packages\ADCME\hCmEo\deps\CustomOps\build\adcme.dll. Please recompile the shared library by |
No worries about the warning. It will disappear next time when you use ADCME. |
julia> using ADCME julia> ADCME.precompile()
could not find any instance of Visual Studio. -- Configuring incomplete, errors occurred! Stacktrace: |
@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. |
┌ 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\tensorflow_init_.py", line 99, in
│ from tensorflow_core import *
│ File "C:\Users\Farzad.julia\adcme\lib\site-packages\tensorflow_core_init_.py", line 34, in
│ from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
│ File "C:\Users\Farzad.julia\adcme\lib\site-packages\tensorflow_init_.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
The text was updated successfully, but these errors were encountered: