Skip to content
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 in "using PythonCall" #132

Closed
jianghaizhu opened this issue Mar 18, 2022 · 5 comments
Closed

Error in "using PythonCall" #132

jianghaizhu opened this issue Mar 18, 2022 · 5 comments

Comments

@jianghaizhu
Copy link

I wanted to give this excellent package a try but got the following error. Julia 1.7.2 on macOS 11.6.5.

julia> using PythonCall
    CondaPkg Found dependencies: /Users/zhuj6/.julia/environments/v1.7/CondaPkg.toml
    CondaPkg Found dependencies: /Users/zhuj6/.julia/packages/PythonCall/XgP8G/CondaPkg.toml
ERROR: InitError: IOError: could not spawn `/Users/zhuj6/.julia/artifacts/bfd9e864c155203704978fba74583859175640d2/bin/micromamba --version`: no such file or directory (ENOENT)
Stacktrace:
  [1] _spawn_primitive(file::String, cmd::Cmd, stdio::Vector{Any})
    @ Base ./process.jl:100
  [2] #690
    @ ./process.jl:113 [inlined]
  [3] setup_stdios(f::Base.var"#690#691"{Cmd}, stdios::Vector{Any})
    @ Base ./process.jl:197
  [4] _spawn
    @ ./process.jl:112 [inlined]
  [5] open(cmds::Cmd, stdio::Base.DevNull; write::Bool, read::Bool)
    @ Base ./process.jl:371
  [6] open
    @ ./process.jl:362 [inlined]
  [7] open(cmds::Cmd, mode::String, stdio::Base.DevNull)
    @ Base ./process.jl:342
  [8] read(cmd::Cmd)
    @ Base ./process.jl:416
  [9] read(cmd::Cmd, #unused#::Type{String})
    @ Base ./process.jl:427
 [10] executable(; io::IO)
    @ MicroMamba ~/.julia/packages/MicroMamba/0sM3G/src/MicroMamba.jl:44
 [11] cmd(; io::IO)
    @ MicroMamba ~/.julia/packages/MicroMamba/0sM3G/src/MicroMamba.jl:115
 [12] cmd(args::Any; io::IO)
    @ MicroMamba ~/.julia/packages/MicroMamba/0sM3G/src/MicroMamba.jl:119
 [13] conda_cmd(args::Any; io::IO)
    @ CondaPkg ~/.julia/packages/CondaPkg/GoPlj/src/backend.jl:38
 [14] _resolve_conda_create(io::Any, conda_env::Any, specs::Any, channels::Any)
    @ CondaPkg ~/.julia/packages/CondaPkg/GoPlj/src/resolve.jl:144
 [15] resolve(; force::Bool, io::IO, interactive::Bool, dry_run::Bool)
    @ CondaPkg ~/.julia/packages/CondaPkg/GoPlj/src/resolve.jl:261
 [16] resolve()
    @ CondaPkg ~/.julia/packages/CondaPkg/GoPlj/src/resolve.jl:209
 [17] envdir()
    @ CondaPkg ~/.julia/packages/CondaPkg/GoPlj/src/env.jl:66
 [18] init_context()
    @ PythonCall.C ~/.julia/packages/PythonCall/XgP8G/src/cpython/context.jl:56
 [19] __init__()
    @ PythonCall.C ~/.julia/packages/PythonCall/XgP8G/src/cpython/CPython.jl:21
 [20] _include_from_serialized(path::String, depmods::Vector{Any})
    @ Base ./loading.jl:768
 [21] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:854
 [22] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1097
 [23] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1013
 [24] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:997
during initialization of module C
@cjdoris
Copy link
Collaborator

cjdoris commented Mar 18, 2022

What is in /Users/zhuj6/.julia/artifacts/bfd9e864c155203704978fba74583859175640d2/? Is there a bin/ folder?

My guess is that your anti-virus has deleted the micromamba executable.

@jianghaizhu
Copy link
Author

I have bin/ and info/ under /Users/zhuj6/.julia/artifacts/bfd9e864c155203704978fba74583859175640d2/. bin/ is empty but info/ has a bunch of files under it. I also checked other artifacts and their executabls are still under their bin/.

@cjdoris
Copy link
Collaborator

cjdoris commented Mar 18, 2022

If bin is there but empty I'm now 99% sure it's your anti-virus - check if it has quarantined the executable.

Failing that, delete /Users/zhuj6/.julia/artifacts/bfd9e864c155203704978fba74583859175640d2/ and try again. Failing that, install Conda or Mamba or MicroMamba yourself and set the environment variable JULIA_CONDAPKG_BACKEND=System.

@jianghaizhu
Copy link
Author

You are absolutely right. My anti-virus quarantined the file. Thank you so much!

@cjdoris
Copy link
Collaborator

cjdoris commented Mar 18, 2022

Great 👍

@cjdoris cjdoris closed this as completed Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants