JuliaPy / JuliaPy/PyCall.jl

unable to use beautifulsoup

Offen
#717 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Julia
Sterne
1.5k
Forks
186
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

The following seems to download/install beautifulsoup (or rather, state that it is already there).
do you happen to know why this fails?

```
julia> PyCall.pyimport_conda("beautifulsoup4","beautifulsoup4")
[ Info: Installing beautifulsoup4 via the Conda beautifulsoup4 package...
[ Info: Running `conda install -y beautifulsoup4` in root environment
Collecting package metadata (current_repodata.json): done
Solving environment: done

# All requested packages already installed.

ERROR: PyError (PyImport_ImportModule

The Python package beautifulsoup4 could not be found by pyimport. Usually this means
that you did not install beautifulsoup4 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 beautifulsoup4 module, you can
use `pyimport_conda("beautifulsoup4", PKG)`, where PKG is the Anaconda
package the contains the module beautifulsoup4, 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.

)
ModuleNotFoundError("No module named 'beautifulsoup4'",)

Stacktrace:
[1] pyimport(::String) at C:\Users\bernhard.konig.ROOT_MILLIMAN\.julia\packages\PyCall\ttONZ\src\PyCall.jl:544
[2] pyimport_conda(::String, ::String, ::String) at C:\Users\bernhard.konig.ROOT_MILLIMAN\.julia\packages\PyCall\ttONZ\src\PyCall.jl:708
[3] pyimport_conda(::String, ::String) at C:\Users\bernhard.konig.ROOT_MILLIMAN\.julia\packages\PyCall\ttONZ\src\PyCall.jl:701
[4] top-level scope at none:0
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.