与朱莉娅建造时的Pyplot问题

发布于 2025-01-21 17:40:08 字数 2512 浏览 1 评论 0 原文

我在朱莉娅(Julia)建造Pycall(我正在使用Mac)遇到问题。我有消息:

朱莉娅> pkg.build(“ pycall”) 构建conda - →〜/.julia/packages/conda/3rphk/dep/build.log

building pycall→〜/.julia/.julia/packages/pycall/bctlp/deps/build.log <

┌ Error: Error building `PyCall`: 
│   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
│                                  Dload  Upload   Total   Spent    Left  Speed
0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 55.2M  100 55.2M    0     0  8088k      0  0:00:06  0:00:06 --:--:--  9.8M
│ ERROR: did not recognize option '1/.julia/conda/3', please try -h
│ ┌ Info: Using the Python distribution in the Conda package by default.
│ └ To use a different Python version, set ENV["PYTHON"]="pythoncommand" and re-run    Pkg.build("PyCall").
│ [ Info: Downloading miniconda installer ...
│ [ Info: Installing miniconda ...
│ ERROR: LoadError: failed process: Process(`'/Users/ymedinag 1/.julia/conda/3/installer.sh' -b -f -p '/Users/ymedinag 1/.julia/conda/3'`, ProcessExited(1)) [1]
│ Stacktrace:
│  [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42
│  [2] pipeline_error at ./process.jl:705 [inlined]
│  [3] #run#505(::Bool, ::Function, ::Cmd) at ./process.jl:663
│  [4] run at ./process.jl:661 [inlined]
│  [5] _install_conda(::String, ::Bool) at /Users/ymedinag 1/.julia/packages/Conda/3rPhK/src/Conda.jl:169
│  [6] _install_conda(::String) at /Users/ymedinag 1/.julia/packages/Conda/3rPhK/src/Conda.jl:155
│  [7] runconda(::Cmd, ::String) at /Users/ymedinag 1/.julia/packages/Conda/3rPhK/src/Conda.jl:112
│  [8] #add#1(::String, ::Function, ::String, ::String) at /Users/ymedinag 1/.julia/packages/Conda/3rPhK/src/Conda.jl:188
│  [9] add at /Users/ymedinag 1/.julia/packages/Conda/3rPhK/src/Conda.jl:187 [inlined] (repeats 2 times)
│  [10] top-level scope at /Users/ymedinag 1/.julia/packages/PyCall/BcTLp/deps/build.jl:84
│  [11] include at ./boot.jl:317 [inlined]
│  [12] include_relative(::Module, ::String) at ./loading.jl:1044
│  [13] include(::Module, ::String) at ./sysimg.jl:29
│  [14] include(::String) at ./client.jl:392
│  [15] top-level scope at none:0
│ in expression starting at /Users/ymedinag 1/.julia/packages/PyCall/BcTLp/deps/build.jl:43
└ @ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1096

您是否有任何想法正确安装了Pycall?

谢谢

I am having problems building PyCall in Julia (I am using a Mac). I have the message:

julia> Pkg.build("PyCall")
Building Conda ─→ ~/.julia/packages/Conda/3rPhK/deps/build.log

Building PyCall → ~/.julia/packages/PyCall/BcTLp/deps/build.log

┌ Error: Error building `PyCall`: 
│   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
│                                  Dload  Upload   Total   Spent    Left  Speed
0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 55.2M  100 55.2M    0     0  8088k      0  0:00:06  0:00:06 --:--:--  9.8M
│ ERROR: did not recognize option '1/.julia/conda/3', please try -h
│ ┌ Info: Using the Python distribution in the Conda package by default.
│ └ To use a different Python version, set ENV["PYTHON"]="pythoncommand" and re-run    Pkg.build("PyCall").
│ [ Info: Downloading miniconda installer ...
│ [ Info: Installing miniconda ...
│ ERROR: LoadError: failed process: Process(`'/Users/ymedinag 1/.julia/conda/3/installer.sh' -b -f -p '/Users/ymedinag 1/.julia/conda/3'`, ProcessExited(1)) [1]
│ Stacktrace:
│  [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42
│  [2] pipeline_error at ./process.jl:705 [inlined]
│  [3] #run#505(::Bool, ::Function, ::Cmd) at ./process.jl:663
│  [4] run at ./process.jl:661 [inlined]
│  [5] _install_conda(::String, ::Bool) at /Users/ymedinag 1/.julia/packages/Conda/3rPhK/src/Conda.jl:169
│  [6] _install_conda(::String) at /Users/ymedinag 1/.julia/packages/Conda/3rPhK/src/Conda.jl:155
│  [7] runconda(::Cmd, ::String) at /Users/ymedinag 1/.julia/packages/Conda/3rPhK/src/Conda.jl:112
│  [8] #add#1(::String, ::Function, ::String, ::String) at /Users/ymedinag 1/.julia/packages/Conda/3rPhK/src/Conda.jl:188
│  [9] add at /Users/ymedinag 1/.julia/packages/Conda/3rPhK/src/Conda.jl:187 [inlined] (repeats 2 times)
│  [10] top-level scope at /Users/ymedinag 1/.julia/packages/PyCall/BcTLp/deps/build.jl:84
│  [11] include at ./boot.jl:317 [inlined]
│  [12] include_relative(::Module, ::String) at ./loading.jl:1044
│  [13] include(::Module, ::String) at ./sysimg.jl:29
│  [14] include(::String) at ./client.jl:392
│  [15] top-level scope at none:0
│ in expression starting at /Users/ymedinag 1/.julia/packages/PyCall/BcTLp/deps/build.jl:43
└ @ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1096

Would you have any idea to have PyCall properly installed ?

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

北风几吹夏 2025-01-28 17:40:08

问题源于您的用户名中有一个空间,或者更具体地说是您的用户目录/users/ymedinag 1/。不幸的是,它似乎是已知 and =“ https://github.com/continuumio/anaconda-issues/issues/3947” rel =“ nofollow noreferrer”>未解决的 Anaconda安装程序问题。在这里,Pycall默认情况下试图通过Conda.jl使用Miniconda Python,而Miniconda的 installer.sh.sh script又尝试通过Miniconda Python进行安装。问题来自该脚本显然无法处理安装目录中的空格。

您可以将Miniconda自己安装到没有空间的目录中,然后设置 env [“ Python”] =&lt; your-miniconda-,而不是使用默认的朱莉娅管理的conda-python(未安装) Python-Path&gt; 在运行 pkg.build(“ pycall”)之前。

The problem comes from the fact that there's a space in your username, or more specifically your user directory /Users/ymedinag 1/. Unfortunately, it seems to be a known and unresolved problem with Anaconda installers. Here, PyCall by default tries to use a miniconda Python, via Conda.jl, which in turn tries to install it via miniconda's installer.sh script. The problem comes from that script apparently being unable to deal with spaces in the installation directory.

Instead of using the default Julia-managed conda-Python (which is failing to install), you can instead install miniconda yourself to a directory without spaces, and then set ENV["PYTHON"] = <your-miniconda-python-path> before running Pkg.build("PyCall") again.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文