Closed farzadforouzanfard87 closed 3 years ago
Hello, you had an old installation "current ADCME version is 0.5.13". Could you try the following
C:\Users\Farzad.julia\adcme
using ADCME
Pkg.build("ADCME")
Make sure you have the latest version (0.6.7) (you can use Pkg.status("ADCME")
to check.
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\tensorflow__init.py", line 99, in
What is the output of
$ C:\Users\Farzad.julia\adcme\python.exe
import tensorflow
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\core__init__.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 "
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:
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.
It looks like your NumPy DLL was not loaded. Could you try
$ C:\Users\Farzad.julia\adcme\python.exe
import numpy
import numpy Traceback (most recent call last): File "C:\Users\Farzad.julia\adcme\lib\site-packages\numpy\core__init__.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 "
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:
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.
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
?
Hi, Kailai, 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
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)
Hi, Kailai, 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 ☹☹☹☹
┌ Error: Error building
│ 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
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 usepyimport_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 byConda.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