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

cannot import pyarrow with PythonCall #339

Open
tbeason opened this issue Jul 14, 2023 · 6 comments
Open

cannot import pyarrow with PythonCall #339

tbeason opened this issue Jul 14, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@tbeason
Copy link

tbeason commented Jul 14, 2023

Affects: PythonCall

Describe the bug

Cannot import pyarrow using PythonCall.jl

In a fresh environment / new folder:

using Pkg
Pkg.activate(".")
Pkg.add("CondaPkg")

using CondaPkg
CondaPkg.add("pyarrow")

Pkg.add("PythonCall")
using PythonCall
pyarrow = pyimport("pyarrow")

Result:

julia> pyarrow = pyimport("pyarrow")
ERROR: Python: ImportError: DLL load failed while importing lib: The specified procedure could not be found.
Python stacktrace:
 [1] <module>
   @ C:\Users\beasont\condatest\.CondaPkg\env\Lib\site-packages\pyarrow\__init__.py:65
Stacktrace:
 [1] pythrow()
   @ PythonCall C:\Users\beasont\.julia\packages\PythonCall\1f5yE\src\err.jl:94
 [2] errcheck
   @ C:\Users\beasont\.julia\packages\PythonCall\1f5yE\src\err.jl:10 [inlined]
 [3] pyimport(m::String)
   @ PythonCall C:\Users\beasont\.julia\packages\PythonCall\1f5yE\src\concrete\import.jl:11
 [4] top-level scope
   @ REPL[11]:1

Info:

(condatest) pkg> conda st
CondaPkg Status C:\Users\beasont\condatest\CondaPkg.toml
Environment
  C:\Users\beasont\condatest\.CondaPkg\env
Packages
  pyarrow v12.0.1

(condatest) pkg> st
Status `C:\Users\beasont\condatest\Project.toml`
  [992eb4ea] CondaPkg v0.2.18
  [6099a3de] PythonCall v0.9.13

julia> versioninfo()
Julia Version 1.9.2
Commit e4ee485e90 (2023-07-05 09:39 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 32 × AMD Ryzen 9 5950X 16-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, znver3)
  Threads: 1 on 32 virtual cores
@tbeason tbeason added the bug Something isn't working label Jul 14, 2023
@tbeason
Copy link
Author

tbeason commented Jul 14, 2023

FWIW, it worked about a month or two ago?

@tbeason
Copy link
Author

tbeason commented Jul 14, 2023

I should add that I've gotten it to work fine on a Linux computer, so this could be Windows-specific or could be related to my system somehow. But I'm not using any system installations of anything.

@tbeason
Copy link
Author

tbeason commented Jul 17, 2023

Hmm.. not sure what is happening. Tried it on my Windows laptop -- failed with installation via conda add, but worked instead with conda pip_add...

Recently updated my desktop to Windows 11, so that could be the issue. I'm starting to think the problem lies with pyarrow itself, but not certain because I can open python and import pyarrow with no issues.

@cjdoris
Copy link
Collaborator

cjdoris commented Jul 23, 2023

If you open Julia in a setup where importing pyarrow fails, then do pkg> conda run python to open Python and import pyarrow there, does it work? (This checks the package is ok in the exact same Python environment).

@github-actions
Copy link
Contributor

This issue has been marked as stale because it has been open for 30 days with no activity. If the issue is still relevant then please leave a comment, or else it will be closed in 7 days.

@github-actions github-actions bot added the stale Issues about to be auto-closed label Aug 23, 2023
@github-actions
Copy link
Contributor

This issue has been closed because it has been stale for 7 days. You can re-open it if it is still relevant.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 30, 2023
@cjdoris cjdoris removed the stale Issues about to be auto-closed label Sep 22, 2023
@cjdoris cjdoris reopened this Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants