name 'sys' is not defined

safiq713 at gmail.com safiq713 at gmail.com
Mon Dec 30 00:20:54 EST 2019


Deal all,
Could you please help me how can I avoid this problem
my Jupyter Notebook code was 
help pls



# init a treemix analysis object with some param arguments
tmx = ipa.treemix(
    data=data,
    imap=imap,
    minmap=minmap,
    seed=123456,
    root="Petronia_petronia",
    m=2,
)

error

NameError                                 Traceback (most recent call last)
<ipython-input-8-d80ffd5719d7> in <module>
      6     seed=123456,
      7     root="Petronia_petronia",
----> 8     m=2,
      9 )

~/opt/miniconda3/envs/py3/lib/python3.6/site-packages/ipyrad/analysis/treemix.py in __init__(self, data, name, workdir, imap, minmap, seed, quiet, raise_root_error, binary, *args, **kwargs)
    118 
    119         # others
--> 120         self.binary = os.path.join(sys.prefix, "bin", "treemix")
    121         self.binary = (binary if binary else self.binary)
    122         self.raise_root_error = raise_root_error

NameError: name 'sys' is not defined


More information about the Python-list mailing list