Suzhou-Tongyuan / jnumpy

Writing Python C extensions in Julia within 5 minutes.
MIT License
234 stars 8 forks source link

`argparse` get error when importing jnumpy from julia #66

Closed songjhaha closed 2 years ago

songjhaha commented 2 years ago
  julia> np = CPython.py_import("jnumpy")
  ERROR: Traceback (most recent call last):
    File "/home/songjhaha/miniconda3/envs/dev/lib/python3.7/site-packages/jnumpy/__init__.py", line 1, in <module>
      from .init import init_jl
    File "/home/songjhaha/miniconda3/envs/dev/lib/python3.7/site-packages/jnumpy/init.py", line 11, in <module>
      from .defaults import setup_julia_exe_, get_project_args
    File "/home/songjhaha/miniconda3/envs/dev/lib/python3.7/site-packages/jnumpy/defaults.py", line 5, in <module>
      import jnumpy.envars as envars
    File "/home/songjhaha/miniconda3/envs/dev/lib/python3.7/site-packages/jnumpy/envars.py", line 33, in <module>
      jl_opts_parse = argparse.ArgumentParser()
    File "/home/songjhaha/miniconda3/envs/dev/lib/python3.7/argparse.py", line 1647, in __init__
      prog = _os.path.basename(_sys.argv[0])
  IndexError: list index out of range