Skip to content
New issue

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

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

Already on GitHub? # to your account

Building Error #4

Open
guipradow opened this issue Sep 18, 2018 · 9 comments
Open

Building Error #4

guipradow opened this issue Sep 18, 2018 · 9 comments

Comments

@guipradow
Copy link

I tryed to install CoolProp following this steps:
Julia> Pkg.clone("https://github.com/vimalaad/CoolProp.jl.git")
%with the following message:

┌ Warning: Pkg.clone is only kept for legacy CI script reasons, please use add
└ @ Pkg.API ~/julia/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:460
Updating registry at ~/.julia/registries/General
Updating git-repo https://github.com/JuliaRegistries/General.git
Updating git-repo https://github.com/vimalaad/CoolProp.jl.git
[ Info: Assigning UUID e084ae63-2819-5025-826e-f8e611a84251 to CoolProp
[ Info: Path /home/prado/.julia/dev/CoolProp exists and looks like the correct package, using existing path instead of cloning
Resolving package versions...
Updating ~/.julia/environments/v1.1/Project.toml
[no changes]
Updating ~/.julia/environments/v1.1/Manifest.toml

Then I tried:
Julia> Pkg.Build("CoolProp")
%with the following message:

Building CoolProp → ~/.julia/dev/CoolProp/deps/build.log
Resolving package versions...
┌ Error: Error building CoolProp:
│ ERROR: LoadError: ArgumentError: isdefined: too few arguments (expected 2)
│ Stacktrace:
│ [1] top-level scope at /home/prado/.julia/dev/CoolProp/deps/build.jl:6
│ [2] include at ./boot.jl:317 [inlined]
│ [3] include_relative(::Module, ::String) at ./loading.jl:1041
│ [4] include(::Module, ::String) at ./sysimg.jl:29
│ [5] include(::String) at ./client.jl:388
│ [6] top-level scope at none:0
│ in expression starting at /home/prado/.julia/dev/CoolProp/deps/build.jl:5

I also tried add CoolProp directly using Pkg:
Julia> Pkg.add("CoolProp")
%with the following message:

Resolving package versions...
Updating ~/.julia/environments/v1.1/Project.toml
[no changes]
Updating ~/.julia/environments/v1.1/Manifest.toml

Then I tried:
Julia> using CoolProp
%with the following message:

[ Info: Precompiling CoolProp [e084ae63-2819-5025-826e-f8e611a84251]
ERROR: LoadError: UndefVarError: Libdl not defined
Stacktrace:
[1] top-level scope at none:0
[2] include at ./boot.jl:317 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1041
[4] include(::Module, ::String) at ./sysimg.jl:29
[5] top-level scope at none:2
[6] eval at ./boot.jl:319 [inlined]
[7] eval(::Expr) at ./client.jl:389
[8] top-level scope at ./none:3
in expression starting at /home/prado/.julia/dev/CoolProp/src/CoolProp.jl:1
ERROR: Failed to precompile CoolProp [e084ae63-2819-5025-826e-f8e611a84251] to /home/prado/.julia/compiled/v1.1/CoolProp/TgXq7.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at ./logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1187
[4] macro expansion at ./logging.jl:311 [inlined]
[5] _require(::Base.PkgId) at ./loading.jl:944
[6] require(::Base.PkgId) at ./loading.jl:855
[7] macro expansion at ./logging.jl:311 [inlined]
[8] require(::Module, ::Symbol) at ./loading.jl:837

@duncanam
Copy link

I'd like to +1 this on Julia 1.2. During the clone/add stage I get hit with:

┌ Error: Error building CoolProp:
│ ERROR: LoadError: ArgumentError: isdefined: too few arguments (expected 2)
│ Stacktrace:
│ [1] top-level scope at /home/duncan/.julia/dev/CoolProp/deps/build.jl:6
│ [2] include(::String) at ./client.jl:431
│ [3] top-level scope at none:5
│ in expression starting at /home/duncan/.julia/dev/CoolProp/deps/build.jl:5
└ @ Pkg.Operations /build/julia/src/julia-1.2.0/usr/share/julia/stdlib/v1.2/Pkg/src/backwards_compatible_isolation.jl:647

@akshayb29
Copy link

I've been having the same issue. Were either of you able to solve the problem?

@duncanam
Copy link

I've been having the same issue. Were either of you able to solve the problem?

I have not. I suspect this is because this has been orphaned since Julia v0.6, and the language has changed significantly in that span. I'm trying to work through build.jl and see if I can fix them, but easiest thing to do for the moment in order to get CoolProp functioning is to probably utilize PyCall and just call CoolProp through that.

@cstook
Copy link

cstook commented Nov 18, 2019

I think the installation instructions need to be updated to point to this repository instead of "https://github.com/vimalaad/CoolProp.jl.git"

@akshayb29
Copy link

I will try using PyCall. I tried it earlier but I didn't have any success. Is the following the right way to use it?

using PyCall
@pyimport CoolProp.CoolProp as CP

When I did this, I ran into the following issue:

PyError (PyImport_ImportModule

The Python package CoolProp.CoolProp could not be found by pyimport. Usually this means
that you did not install CoolProp.CoolProp in the Python version being used by PyCall.

PyCall is currently configured to use the Julia-specific Python distribution
installed by the Conda.jl package. To install the CoolProp.CoolProp module, you can
use pyimport_conda("CoolProp.CoolProp", PKG), where PKG is the Anaconda
package the contains the module CoolProp.CoolProp, or alternatively you can use the
Conda package directly (via using Conda followed by Conda.add etcetera).

Alternatively, if you want to use a different Python distribution on your
system, such as a system-wide Python (as opposed to the Julia-specific Python),
you can re-configure PyCall with that Python. As explained in the PyCall
documentation, set ENV["PYTHON"] to the path/name of the python executable
you want to use, run Pkg.build("PyCall"), and re-launch Julia.

) <class 'ModuleNotFoundError'>
ModuleNotFoundError("No module named 'CoolProp'")

Stacktrace:
[1] pyimport(::String) at /Users/akshayb/.julia/packages/PyCall/ttONZ/src/PyCall.jl:544
[2] top-level scope at /Users/akshayb/.julia/packages/PyCall/ttONZ/src/PyCall.jl:588
[3] top-level scope at In[2]:1

@duncanam
Copy link

I think the installation instructions need to be updated to point to this repository instead of "https://github.com/vimalaad/CoolProp.jl.git"

Thanks, I made a pull request with that update. It worked for me what I changed that URL without issues.

I will try using PyCall. I tried it earlier but I didn't have any success. Is the following the right way to use it?

using PyCall
@pyimport CoolProp.CoolProp as CP

When I did this, I ran into the following issue:

PyError (PyImport_ImportModule

The Python package CoolProp.CoolProp could not be found by pyimport. Usually this means
that you did not install CoolProp.CoolProp in the Python version being used by PyCall.

PyCall is currently configured to use the Julia-specific Python distribution
installed by the Conda.jl package. To install the CoolProp.CoolProp module, you can
use pyimport_conda("CoolProp.CoolProp", PKG), where PKG is the Anaconda
package the contains the module CoolProp.CoolProp, or alternatively you can use the
Conda package directly (via using Conda followed by Conda.add etcetera).

Alternatively, if you want to use a different Python distribution on your
system, such as a system-wide Python (as opposed to the Julia-specific Python),
you can re-configure PyCall with that Python. As explained in the PyCall
documentation, set ENV["PYTHON"] to the path/name of the python executable
you want to use, run Pkg.build("PyCall"), and re-launch Julia.

) <class 'ModuleNotFoundError'>
ModuleNotFoundError("No module named 'CoolProp'")

Stacktrace:
[1] pyimport(::String) at /Users/akshayb/.julia/packages/PyCall/ttONZ/src/PyCall.jl:544
[2] top-level scope at /Users/akshayb/.julia/packages/PyCall/ttONZ/src/PyCall.jl:588
[3] top-level scope at In[2]:1

Have you done a pip install CoolProp? If you have, I was then able to do something like:

using PyCall
cp = pyimport("CoolProp.CoolProp")
state = cp.PropsSI("T","P",101325,"Q",0,"Water")
display(state)

That being said, I'd try adding it directly in Julia again via the recommendation of @cstook. I forked and edited the ReadMe to reflect this and added a pull request to try to get this updated for everyone.

@akshayb29
Copy link

I tried using the code above and received the same error message as before.

Additionally, I tried installing from CoolProp/CoolProp.jl but I had an error in building!

I was able to install it on my Windows about a year ago on Julia v1.1.1 without any issues. I just switched to a Mac and I can't seem to install it on Julia v1.1.1

@duncanam
Copy link

I tried using the code above and received the same error message as before.

Additionally, I tried installing from CoolProp/CoolProp.jl but I had an error in building!

I was able to install it on my Windows about a year ago on Julia v1.1.1 without any issues. I just switched to a Mac and I can't seem to install it on Julia v1.1.1

I'm on a linux box, but can check a Windows machine later too. I should have mentioned this: I needed to go into ~/.julia/dev/ and remove the old CoolProp folder as that was conflicting. After I did that the Pkg.clone("https://github.com/CoolProp/CoolProp.jl.git") built successfully for me.

As for the Python call, my gut feeling is that however you installed CoolProp in Python (either with pip or conda), Julia's PyCall is using a different environment. I presume you've also tried toying with the environment as per this link?

@akshayb29
Copy link

I tried using the code above and received the same error message as before.
Additionally, I tried installing from CoolProp/CoolProp.jl but I had an error in building!
I was able to install it on my Windows about a year ago on Julia v1.1.1 without any issues. I just switched to a Mac and I can't seem to install it on Julia v1.1.1

I'm on a linux box, but can check a Windows machine later too. I should have mentioned this: I needed to go into ~/.julia/dev/ and remove the old CoolProp folder as that was conflicting. After I did that the Pkg.clone("https://github.com/CoolProp/CoolProp.jl.git") built successfully for me.

As for the Python call, my gut feeling is that however you installed CoolProp in Python (either with pip or conda), Julia's PyCall is using a different environment. I presume you've also tried toying with the environment as per this link?

Removing the old folder and trying to build the package again worked. Thank you so much for your help!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants