anaconda / nbpresent

next generation slides for Jupyter Notebooks
BSD 3-Clause "New" or "Revised" License
164 stars 24 forks source link

nbpresent.install conda env prefix #12

Closed bollwyvl closed 9 years ago

bollwyvl commented 9 years ago

This is the beginning of #10.

Everything works great installing from repo with a conda env, but the build gives the same issue as this: https://github.com/ipython/ipython/issues/8833

Very curious!

It's not fully working yet, but if someone was able to see some obvious errors up front, I'm all for it.

Obviously ignore all the little style tweaks: it's really just the recipe and install.py.

bollwyvl commented 9 years ago

Got closer by simplifying things, but am still seeing the ipython/ipython#8833 issue:

==== testing package: nbpresent-0.3.0.dev0-py34_0 =====
import: 'nbpresent'
/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/IPython/config.py:13: ShimWarning: The `IPython.config` package has been deprecated. You should import from traitlets.config instead.
  "You should import from traitlets.config instead.", ShimWarning)
Traceback (most recent call last):
  File "/home/weg/miniconda3/conda-bld/test-tmp_dir/run_test.py", line 25, in <module>
    import nbpresent
  File "/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/nbpresent/__init__.py", line 4, in <module>
    from .exporter import PresentExporter
  File "/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/nbpresent/exporter.py", line 5, in <module>
    from nbconvert.exporters.html import HTMLExporter
  File "/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/nbconvert/__init__.py", line 4, in <module>
    from .exporters import *
  File "/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/nbconvert/exporters/__init__.py", line 1, in <module>
    from .export import *
  File "/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/nbconvert/exporters/export.py", line 12, in <module>
    from .templateexporter import TemplateExporter
  File "/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/nbconvert/exporters/templateexporter.py", line 21, in <module>
    from nbconvert import filters
  File "/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/nbconvert/filters/__init__.py", line 7, in <module>
    from .strings import *
  File "/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/nbconvert/filters/strings.py", line 20, in <module>
    from IPython.core.interactiveshell import InteractiveShell
  File "/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/IPython/core/interactiveshell.py", line 35, in <module>
    from IPython.core import debugger, oinspect
  File "/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/IPython/core/oinspect.py", line 33, in <module>
    from IPython.core import page
  File "/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/IPython/core/page.py", line 37, in <module>
    from IPython import get_ipython
  File "/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/IPython/__init__.py", line 48, in <module>
    from .core.application import Application
  File "/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/IPython/core/application.py", line 40, in <module>
    from IPython.core import release, crashhandler
  File "/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/IPython/core/crashhandler.py", line 28, in <module>
    from IPython.core import ultratb
  File "/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/IPython/core/ultratb.py", line 116, in <module>
    from IPython.utils import path as util_path
  File "/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/IPython/utils/path.py", line 29, in <module>
    from IPython.utils.process import system
  File "/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/IPython/utils/process.py", line 29, in <module>
    from ._process_posix import _find_cmd, system, getoutput, arg_split
  File "/home/weg/miniconda3/envs/_test/lib/python3.4/site-packages/IPython/utils/_process_posix.py", line 22, in <module>
    from IPython.external import pexpect
ImportError: cannot import name 'pexpect'
TESTS FAILED: nbpresent-0.3.0.dev0-py34_0
bollwyvl commented 9 years ago

I've been going down a really long road to create a fully reproducible conda chain in docker... will push soon. But I have definitely identified some problem on my host fedora 23 install with finding the old version of IPython. I'll try reinstalling it locally, too!

The current issue I am having is in creating a pristine "runnable" environment with a basic notebook server. But more on that soon.

bollwyvl commented 9 years ago

I feel pretty good about this now. I pushed up a package:

And have started messing with the builds.

I plan to set up the github integration very soon.

In the meantime, I'll merge this and handle bugs as they arise in dealing with the build automation.

Hooray!

ijstokes commented 9 years ago

@bollwyvl conda environments should help you here, unless you have a complicated .bash_profile (or similar) and per-user Python or IPython config files.

bollwyvl commented 9 years ago

Heh, I got more environments than I know what to do with.

The issue up there was that in post-link.sh, during the build the test environment is not on PATH, so "python" isn't "this environment's python". Got that cleared up, and every stayed in the right path. Weirdly, I am still having issues on the docker image, but do think that will eventually have a lot of value... if only for documentation.

On Sun, Nov 15, 2015 at 12:16 AM Ian Stokes-Rees notifications@github.com wrote:

@bollwyvl https://github.com/bollwyvl conda environments should help you here, unless you have a complicated .bash_profile (or similar) and per-user Python or IPython config files.

— Reply to this email directly or view it on GitHub https://github.com/ContinuumIO/nbpresent/pull/12#issuecomment-156782900.

damianavila commented 9 years ago

The issue up there was that in post-link.sh, during the build the test environment is not on PATH, so "python" isn't "this environment's python". Got that cleared up, and every stayed in the right path. Weirdly, I am still having issues on the docker image, but do think that will eventually have a lot of value... if only for documentation.

Uppssss... nice you figured out...