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

CondaPkg opt out doesn't work #301

Closed
aditya-sengupta opened this issue Apr 27, 2023 · 4 comments
Closed

CondaPkg opt out doesn't work #301

aditya-sengupta opened this issue Apr 27, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@aditya-sengupta
Copy link

Affects: PythonCall

Describe the bug
Opting out of CondaPkg.jl by setting an environment variable as stated in the documentation doesn't work.

Steps to reproduce: in a directory with a Python venv, run

ENV["JULIA_CONDAPKG_BACKEND"] = "Null"
ENV["JULIA_PYTHONCALL_EXE"] = "./.venv/bin/python"
using PythonCall
pyexec("import sys; print(sys.executable)", Main)

Expected output is /path/to/pwd/.venv/bin/python, actual output is /path/to/pwd/.CondaPkg/env/bin/python.

Your system
Please provide detailed information about your system:

  • MacOS Ventura 13.2.1 on a 2021 MacBook Pro with Apple M1 Pro chip
  • Julia 1.8.5, Python 3.10.10 (desired, in venv) and Python 3.11.3 (undesired, in Conda), PythonCall v0.9.12,
julia> versioninfo()
Julia Version 1.8.5
Commit 17cfb8e65ea (2023-01-08 06:45 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.5.0)
  CPU: 10 × Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
  Threads: 8 on 8 virtual cores
Environment:
  JULIA_NUM_THREADS = 8

(testproject) pkg> status
Project TestProject v0.1.0
Status `~/projects/testproject/Project.toml`
  [15e1cf62] NPZ v0.4.3
  [6099a3de] PythonCall v0.9.12
  [276daf66] SpecialFunctions v2.2.0
  [bc48ee85] Tullio v0.3.5

Additional context
I'm doing this so I can import a Python library on a local path and keep using modified versions of it, like with conda develop or pip install -e. I initially got it working by installing in the venv and pyimporting from there, but that doesn't seem to work now. If there's a way to do conda develop-style importing from CondaPkg I'd be okay with that too!

@aditya-sengupta aditya-sengupta added the bug Something isn't working label Apr 27, 2023
@cjdoris
Copy link
Collaborator

cjdoris commented May 14, 2023

I can't reproduce this issue. My guess is that you already have PythonCall loaded in the Julia session before you run that code. Perhaps you have using PythonCall in your startup.jl?

@github-actions
Copy link
Contributor

This issue has been marked as stale because it has been open for 60 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 19, 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 27, 2023
@cjdoris cjdoris removed the stale Issues about to be auto-closed label Sep 22, 2023
@cjdoris cjdoris reopened this Sep 22, 2023
@aditya-sengupta
Copy link
Author

Was going back through my old issues and I also found I couldn't reproduce this - I think you were probably right that I had run something in my Julia session before.

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