jmaupetit/md2pdf

This package cannot be safely installed by EasyInstall

NINI1988 opened this issue · 4 comments

$ pip install md2pdf
Collecting md2pdf
  Using cached https://files.pythonhosted.org/packages/a4/f4/94df8506f6164f0704eb71713f5db1f6017d987f9339d3a9a4f04ed47094/md2pdf-0.4-py2.py3-none-any.whl
Collecting WeasyPrint
  Using cached https://files.pythonhosted.org/packages/ca/1a/1925cf1e39e5526d9c686a31f798523e06ea45f20c958a429317a1110ee4/WeasyPrint-50-py3-none-any.whl
Collecting markdown2
  Using cached https://files.pythonhosted.org/packages/89/d2/6aef45472f7956646fdc4cc5284e6f9d00476497a8d167c30b0f78bb75a5/markdown2-2.3.8-py2.py3-none-any.whl
Collecting docopt
  Using cached https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz
Collecting Pyphen>=0.8
  Using cached https://files.pythonhosted.org/packages/15/82/08a3629dce8d1f3d91db843bb36d4d7db6b6269d5067259613a0d5c8a9db/Pyphen-0.9.5-py2.py3-none-any.whl
Collecting cssselect2>=0.1
  Using cached https://files.pythonhosted.org/packages/c4/a1/1a37602bbcfa2f7c079758f31555776a00a947e43457a3e0110b2165c7d9/cssselect2-0.2.2-py2.py3-none-any.whl
Collecting html5lib>=0.999999999
  Using cached https://files.pythonhosted.org/packages/a5/62/bbd2be0e7943ec8504b517e62bab011b4946e1258842bc159e5dfde15b96/html5lib-1.0.1-py2.py3-none-any.whl
Collecting CairoSVG>=2.4.0
  Using cached https://files.pythonhosted.org/packages/8e/3a/762f9272c20db092f4d537aaf364dd0770ecf8f7101b58c4e933e99ee2f6/CairoSVG-2.4.2-py3-none-any.whl
Collecting cairocffi>=0.9.0
  Using cached https://files.pythonhosted.org/packages/f7/99/b3a2c6393563ccbe081ffcceb359ec27a6227792c5169604c1bd8128031a/cairocffi-1.1.0.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\c.nienhaus\appdata\local\programs\python\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\c.nienhaus\\AppData\\Local\\Temp\\pip-install-y_ia_0kh\\cairocffi\\setup.py'"'"'; __file__='"'"'C:\\Users\\c.nienhaus\\AppData\\Local\\Temp\\pip-install-y_ia_0kh\\cairocffi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\c.nienhaus\AppData\Local\Temp\pip-install-y_ia_0kh\cairocffi\pip-egg-info'
         cwd: C:\Users\c.nienhaus\AppData\Local\Temp\pip-install-y_ia_0kh\cairocffi\
    Complete output (106 lines):
    Traceback (most recent call last):
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
        yield saved
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
        yield
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
        _execfile(setup_script, ns)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
        exec(code, globals, locals)
      File "C:\Users\C8BFB~1.NIE\AppData\Local\Temp\easy_install-fc1h5pfy\cffi-1.13.2\setup.py", line 127, in <module>
      File "C:\Users\C8BFB~1.NIE\AppData\Local\Temp\easy_install-fc1h5pfy\cffi-1.13.2\setup.py", line 105, in uses_msvc
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\distutils\command\config.py", line 225, in try_compile
        self._compile(body, headers, include_dirs, lang)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\distutils\command\config.py", line 127, in _compile
        src = self._gen_temp_sourcefile(body, headers, lang)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\distutils\command\config.py", line 109, in _gen_temp_sourcefile
        with open(filename, "w") as file:
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\sandbox.py", line 418, in _open
        self._violation("open", path, mode, *args, **kw)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\sandbox.py", line 407, in _violation
        raise SandboxViolation(operation, args, kw)
    setuptools.sandbox.SandboxViolation: SandboxViolation: open('_configtest.c', 'w') {}

    The package setup script has attempted to modify files on your system
    that are not within the EasyInstall build area, and has been aborted.

    This package cannot be safely installed by EasyInstall, and may not
    support alternate installation locations even if you run its setup
    script by hand.  Please inform the package's author and the EasyInstall
    maintainers to find out if a fix or workaround is available.


    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\c.nienhaus\AppData\Local\Temp\pip-install-y_ia_0kh\cairocffi\setup.py", line 10, in <module>
        setup(
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\__init__.py", line 144, in setup
        _install_setup_requires(attrs)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\dist.py", line 716, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\pkg_resources\__init__.py", line 780, in resolve
        dist = best[req.key] = env.best_match(
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
        return self.obtain(req, installer)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
        return installer(requirement)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\dist.py", line 786, in fetch_build_egg
        return cmd.easy_install(req)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\command\easy_install.py", line 679, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\command\easy_install.py", line 705, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\command\easy_install.py", line 890, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\command\easy_install.py", line 1158, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\command\easy_install.py", line 1144, in run_setup
        run_setup(setup_script, args)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\sandbox.py", line 253, in run_setup
        raise
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\contextlib.py", line 131, in __exit__
        self.gen.throw(type, value, traceback)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
        yield
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\contextlib.py", line 131, in __exit__
        self.gen.throw(type, value, traceback)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\sandbox.py", line 166, in save_modules
        saved_exc.resume()
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\sandbox.py", line 141, in resume
        six.reraise(type, exc, self._tb)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\_vendor\six.py", line 685, in reraise
        raise value.with_traceback(tb)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
        yield saved
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
        yield
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
        _execfile(setup_script, ns)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
        exec(code, globals, locals)
      File "C:\Users\C8BFB~1.NIE\AppData\Local\Temp\easy_install-fc1h5pfy\cffi-1.13.2\setup.py", line 127, in <module>
      File "C:\Users\C8BFB~1.NIE\AppData\Local\Temp\easy_install-fc1h5pfy\cffi-1.13.2\setup.py", line 105, in uses_msvc
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\distutils\command\config.py", line 225, in try_compile
        self._compile(body, headers, include_dirs, lang)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\distutils\command\config.py", line 127, in _compile
        src = self._gen_temp_sourcefile(body, headers, lang)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\distutils\command\config.py", line 109, in _gen_temp_sourcefile
        with open(filename, "w") as file:
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\sandbox.py", line 418, in _open
        self._violation("open", path, mode, *args, **kw)
      File "c:\users\c.nienhaus\appdata\local\programs\python\python38\lib\site-packages\setuptools\sandbox.py", line 407, in _violation
        raise SandboxViolation(operation, args, kw)
    setuptools.sandbox.SandboxViolation: SandboxViolation: open('_configtest.c', 'w') {}

    The package setup script has attempted to modify files on your system
    that are not within the EasyInstall build area, and has been aborted.

    This package cannot be safely installed by EasyInstall, and may not
    support alternate installation locations even if you run its setup
    script by hand.  Please inform the package's author and the EasyInstall
    maintainers to find out if a fix or workaround is available.

    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Hi @NINI1988, I think you have permissions issue with your python installation. Try to create a virtualenv and then install md2pdf in this virtualenv instead of trying to install it globally first:

# Create the virtualenv
$ python -m venv venv
# Activate this new virtualenv
$ source venv/bin/activate
# Install md2pdf in this virtualenv
(venv) $ pip install md2pdf
# Try it!
(venv) $ md2pdf -h

If you want to install it globally, you may use sudo or alike (I am not familiar with windows):

$ sudo -H pip install md2pdf

HTH

Thanks for your reply.
I guess this happens with python 3.8.
I switched back to python 3.7 and everything work.

Good to know, thanks.

I'll close this then.