{"id":15360699,"url":"https://github.com/tkf/julia-venv","last_synced_at":"2026-06-24T23:31:40.360Z","repository":{"id":66532493,"uuid":"147429531","full_name":"tkf/julia-venv","owner":"tkf","description":"Virtual Julia environments for PyJulia","archived":false,"fork":false,"pushed_at":"2019-04-13T01:24:15.000Z","size":36,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-24T09:38:40.832Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tkf.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-04T22:52:55.000Z","updated_at":"2020-08-07T20:15:16.000Z","dependencies_parsed_at":"2023-06-18T04:03:09.665Z","dependency_job_id":null,"html_url":"https://github.com/tkf/julia-venv","commit_stats":{"total_commits":44,"total_committers":1,"mean_commits":44.0,"dds":0.0,"last_synced_commit":"29d9241faa75bb990e04d779b5a3d784203527d2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tkf/julia-venv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkf%2Fjulia-venv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkf%2Fjulia-venv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkf%2Fjulia-venv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkf%2Fjulia-venv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkf","download_url":"https://codeload.github.com/tkf/julia-venv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkf%2Fjulia-venv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34753781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T12:51:30.418Z","updated_at":"2026-06-24T23:31:40.343Z","avatar_url":"https://github.com/tkf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"** NOTE: julia-venv is now obsolete **\n======================================\n\nThere has been a lot of improvements in PyJulia_.  Many points below\nare now obsolete.  See `Your Python interpreter is statically linked\nto libpython`_ in the PyJulia manual for the latest information.\n\n.. _`Your Python interpreter is statically linked to libpython`:\n   https://pyjulia.readthedocs.io/en/latest/troubleshooting.html#statically-linked\n\nVirtual Julia environments for PyJulia\n======================================\n\n|build-status| |coveralls|\n\nPyJulia_ is an excellent interface to use Julia from Python.  However,\nthere are some limitations (`JuliaPy/pyjulia#185`_) for using it with\nPython installed by Debian-based Linux distributions such as Ubuntu\nand also by Conda.  Fixing this limitation may require some support\nfrom Julia core (`JuliaLang/julia#28518`_).\n\nPyJulia_ currently has a clever hack to workaround this problem but it\nworks only with Julia 0.6.  `julia-venv` is an implementation of a\nsimilar hack but extending it such that it works even with multiple\nvirtual environments created for different Python executables.\n\n.. _JuliaLang/julia#28518: https://github.com/JuliaLang/julia/issues/28518\n.. _JuliaPy/pyjulia#185: https://github.com/JuliaPy/pyjulia/issues/185\n.. _PyJulia: https://github.com/JuliaPy/pyjulia\n\n\nExample usage\n-------------\n\n::\n\n   virtualenv myenv\n   source myenv/bin/activate\n   pip install https://github.com/JuliaPy/pyjulia/archive/master.zip\n   pip install https://github.com/tkf/julia-venv/archive/master.zip\n   julia-venv-manage --help\n   julia-venv-manage install-deps   # install PyCall.jl etc. to myenv\n\nThen, there is a CLI ``julia-venv`` inside ``myenv`` which (tries to)\nbehave like a normal ``julia`` program::\n\n   $ julia-venv\n      _       _ _(_)_     |  Documentation: https://docs.julialang.org\n     (_)     | (_) (_)    |\n      _ _   _| |_  __ _   |  Type \"?\" for help, \"]?\" for Pkg help.\n     | | | | | | |/ _` |  |\n     | | |_| | | | (_| |  |  Version 1.0.0 (2018-08-08)\n    _/ |\\__'_|_|_|\\__'_|  |  Official https://julialang.org/ release\n   |__/                   |\n\n   julia\u003e\n\n\nTo get an appropriately initialized ``julia.Julia`` instance for this\nvirtual environment, use ``julia_venv.get_julia``:\n\n\u003e\u003e\u003e from julia_venv import get_julia\n\u003e\u003e\u003e jl = get_julia()\n\u003e\u003e\u003e jl.eval(\"[1, 2, 3] .+ 10\")\n[11, 12, 13]\n\nOnce ``get_julia`` is called, PyJulia uses Julia runtime configured by\n`julia_venv`:\n\n\u003e\u003e\u003e from julia import Main\n\u003e\u003e\u003e Main.using(\"PyCall\")\n\u003e\u003e\u003e Main.eval(\"pathof(PyCall)\")\n'.../myenv/lib/python3.7/site-packages/julia_venv/depot/packages/PyCall/rUul9/src/PyCall.jl'\n\n\nLimitations (Important!)\n------------------------\n\n**TL;DR** Use ``JuliaVenv.add`` instead of ``Pkg.add`` inside ``julia-env``.\nTry ``JuliaVenv.precompile_package(package)`` if importing Julia ``package``\nresults in suspicious failure.\n\n(Note: `at the moment`__, you need to ``(pip|conda) install sympy``\nfirst to avoid the error from ``PyCall.anaconda_conda`` to run the\nfollowing example.)\n\n__ https://github.com/JuliaPy/PyCall.jl/pull/559\n\nFor example, from ``julia-venv`` REPL:\n\n.. code:: julia\n\n   julia\u003e JuliaVenv.add(\"SymPy\")\n\nFrom Python REPL:\n\n\u003e\u003e\u003e from julia_venv import get_julia\n\u003e\u003e\u003e jl = get_julia()\n\u003e\u003e\u003e from julia import JuliaVenv\n\u003e\u003e\u003e JuliaVenv.add(\"SymPy\")\n\nSince ``julia-venv`` has to monkey-patch a few Julia internal\nfunctions to make module precompilation work, adding (or rather\nprecompiling) modules which depend on PyCall.jl requires a special\nentry point (`JuliaEnv.add`).\n\nPrecompilation is required not just after ``Pkg.add`` but also after\nother operations (e.g., ``]dev`` and ``]activate``).  Use\n``JuliaVenv.precompile_package(package)`` to manually trigger\nprecompile of the package(s).\n\n\nHow it works\n------------\n\nThe key feature of `julia-venv` package is to use `PyCall.jl`_ always\nin \"PyJulia-mode\" so that the precompilation cache can be shared with\nthe Julia interpreter ``julia-venv`` and PyJulia_ API instantiated via\n``julia_venv.get_julia()``.  This is done by calling Julia C API from\nPython in ``julia-venv``.\n\nSince `PyCall.jl`_ requires isolated ``deps`` directory for each\nPython program for which `PyCall.jl`_ is configured, `julia-venv`\nprepares its own `Base.DEPOT_PATH[1]` and ignores the default\n`Base.DEPOT_PATH[1]` (which is ``~/.julia``).\n\n.. _PyCall.jl: https://github.com/JuliaPy/PyCall.jl\n\n.. budges\n\n.. |build-status|\n   image:: https://travis-ci.org/tkf/julia-venv.svg?branch=master\n   :target: https://travis-ci.org/tkf/julia-venv\n   :alt: Build Status\n\n.. |coveralls|\n   image:: https://coveralls.io/repos/github/tkf/julia-venv/badge.svg?branch=master\n   :target: https://coveralls.io/github/tkf/julia-venv?branch=master\n   :alt: Test Coverage\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkf%2Fjulia-venv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkf%2Fjulia-venv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkf%2Fjulia-venv/lists"}