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

Only install pyecharts-jupyter-installer if __name__ == '__main__' #5

Open
jayvdb opened this issue Feb 7, 2019 · 1 comment
Open

Comments

@jayvdb
Copy link

jayvdb commented Feb 7, 2019

Importing setup.py should not run anything.

> py2pack generate pyexcel-handsontable
generating spec file for pyexcel-handsontable...
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/lib/python3.7/site-packages/pyecharts_jupyter_installer'
Consider using the `--user` option or check the permissions.

Traceback (most recent call last):
  File "setup.py", line 11, in <module>
    from pyecharts_jupyter_installer import install_cmd_for
ModuleNotFoundError: No module named 'pyecharts_jupyter_installer'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 17, in <module>
    'pip', 'install', 'pyecharts-jupyter-installer'])
  File "/usr/lib64/python3.7/subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', 'install', 'pyecharts-jupyter-installer']' returned non-zero exit status 1.
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/metaextract/utils.py", line 105, in _setup_py_run_from_dir
    subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
  File "/usr/lib64/python3.7/subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "/usr/lib64/python3.7/subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '/usr/bin/python3 setup.py -q --command-packages metaextract metaextract -o /tmp/tmp0d5_kv0t ' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/py2pack", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.7/site-packages/py2pack/__init__.py", line 350, in main
    args.func(args)
  File "/usr/lib/python3.7/site-packages/py2pack/__init__.py", line 252, in generate
    _augment_data_from_tarball(args, tarball_file[0], data)
  File "/usr/lib/python3.7/site-packages/py2pack/__init__.py", line 155, in _augment_data_from_tarball
    data_archive = meta_utils.from_archive(filename)
  File "/usr/lib/python3.7/site-packages/metaextract/utils.py", line 134, in from_archive
    data = _setup_py_run_from_dir(root_dir, py_interpreter)
  File "/usr/li> py2pack generate pyexcel-handsontable
generating spec file for pyexcel-handsontable...
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/lib/python3.7/site-packages/pyecharts_jupyter_installer'
Consider using the `--user` option or check the permissions.

Traceback (most recent call last):
  File "setup.py", line 11, in <module>
    from pyecharts_jupyter_installer import install_cmd_for
ModuleNotFoundError: No module named 'pyecharts_jupyter_installer'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 17, in <module>
    'pip', 'install', 'pyecharts-jupyter-installer'])
  File "/usr/lib64/python3.7/subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', 'install', 'pyecharts-jupyter-installer']' returned non-zero exit status 1.
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/metaextract/utils.py", line 105, in _setup_py_run_from_dir
    subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
  File "/usr/lib64/python3.7/subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "/usr/lib64/python3.7/subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '/usr/bin/python3 setup.py -q --command-packages metaextract metaextract -o /tmp/tmp0d5_kv0t ' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/py2pack", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.7/site-packages/py2pack/__init__.py", line 350, in main
    args.func(args)
  File "/usr/lib/python3.7/site-packages/py2pack/__init__.py", line 252, in generate
    _augment_data_from_tarball(args, tarball_file[0], data)
  File "/usr/lib/python3.7/site-packages/py2pack/__init__.py", line 155, in _augment_data_from_tarball
    data_archive = meta_utils.from_archive(filename)
  File "/usr/lib/python3.7/site-packages/metaextract/utils.py", line 134, in from_archive
    data = _setup_py_run_from_dir(root_dir, py_interpreter)
  File "/usr/lib/python3.7/site-packages/metaextract/utils.py", line 109, in _setup_py_run_from_dir
    subprocess.check_output(cmd, shell=True)
  File "/usr/lib64/python3.7/subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "/usr/lib64/python3.7/subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '/usr/bin/python3 setup.py -q --command-packages metaextract metaextract -o /tmp/tmp0d5_kv0t ' returned non-zero exit status 1.
b/python3.7/site-packages/metaextract/utils.py", line 109, in _setup_py_run_from_dir
    subprocess.check_output(cmd, shell=True)
  File "/usr/lib64/python3.7/subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "/usr/lib64/python3.7/subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '/usr/bin/python3 setup.py -q --command-packages metaextract metaextract -o /tmp/tmp0d5_kv0t ' returned non-zero exit status 1.
@jayvdb
Copy link
Author

jayvdb commented Feb 7, 2019

Also pyecharts_jupyter_installer shouldnt be installed if pyecharts is already installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant