简体   繁体   中英

PyCall Build Error and conda.core.link Error in Julia

I am new to Julia and want to run a script in Julia. The script needs to install PyPlot package, so I type Pkg.add("PyPlot") to add it. However, after downloading and updating some packages the following error will appears:

Preparing transaction: done Verifying transaction: done Executing transaction: failed ERROR conda.core.link:_execute(502): An error occurred while installing package 'defaults::charset-normalizer-2.0.4-pyhd3eb1b0_0'. CondaError: Cannot link a source that does not exist. C:\Users\seabd4.julia\v0.6\Conda\deps\usr\Scripts\conda.exe Running conda clean --packages may resolve your problem. Attempting to roll back.

Rolling back transaction: done

CondaError: Cannot link a source that does not exist. C:\Users\seabd4.julia\v0.6\Conda\deps\usr\Scripts\conda.exe Running conda clean --packages may resolve your problem.

=====================[ BUILD ERRORS ]==============================

WARNING: PyCall had build errors.

  • packages with build errors remain installed in C:\Users\seabd4.julia\v0.6
  • build the package(s) and all dependencies with Pkg.build("PyCall")
  • build a single package by running its deps/build.jl script

====================================================================

So, I tried to type conda clean --packages but an error appeared again

ERROR: syntax: extra token "clean" after end of expression

Would you please help me solve this problem?

Use Python that is built into Julia. Using an external Python is always possible but more pain;-)

using Pkg
ENV["PYTHON"]=""
Pkg.build("PyCall")
Pkg.build("Conda")
Pkg.add("PyPlot") # or Pkg.build("PyPlot") depending when it failed

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM