rsokl / Learning_Python

Source material for Python Like You Mean it
https://www.pythonlikeyoumeanit.com/
Other
166 stars 54 forks source link

Need requirements.txt for building PLYMI #76

Closed rsokl closed 5 years ago

rsokl commented 5 years ago

Current versions that successfully build plymi

rsokl commented 5 years ago

The following yaml seems to work. I'd like at least one independent verification:

name: plymi
channels:
  - conda-forge
  - defaults
dependencies:
  - alabaster=0.7.12=py_0
  - asn1crypto=0.24.0=py37_1003
  - attrs=19.1.0=py37_1
  - backcall=0.1.0=py37_0
  - blas=1.0=mkl
  - bleach=3.1.0=py37_0
  - ca-certificates=2019.1.23=0
  - certifi=2019.3.9=py37_0
  - cffi=1.12.3=py37hb32ad35_0
  - colorama=0.4.1=py37_0
  - cryptography=2.6.1=py37hb32ad35_0
  - cycler=0.10.0=py37_0
  - decorator=4.4.0=py37_1
  - defusedxml=0.6.0=py_0
  - entrypoints=0.3=py37_0
  - freetype=2.9.1=ha9979f8_1
  - icc_rt=2019.0.0=h0cc432a_1
  - icu=58.2=ha66f8fd_1
  - intel-openmp=2019.3=203
  - ipykernel=5.1.0=py37h39e3cac_0
  - ipython=7.5.0=py37h39e3cac_0
  - ipython_genutils=0.2.0=py37_0
  - ipywidgets=7.4.2=py37_0
  - jedi=0.13.3=py37_0
  - jinja2=2.10.1=py37_0
  - jpeg=9b=hb83a4c4_2
  - jsonschema=3.0.1=py37_0
  - jupyter=1.0.0=py37_7
  - jupyter_client=5.2.4=py37_0
  - jupyter_console=6.0.0=py37_0
  - jupyter_core=4.4.0=py37_0
  - kiwisolver=1.0.1=py37h6538335_0
  - libpng=1.6.37=h2a8f88b_0
  - libsodium=1.0.16=h9d3ae62_0
  - m2w64-gcc-libgfortran=5.3.0=6
  - m2w64-gcc-libs=5.3.0=7
  - m2w64-gcc-libs-core=5.3.0=7
  - m2w64-gmp=6.1.0=2
  - m2w64-libwinpthread-git=5.0.0.4634.697f757=2
  - markupsafe=1.1.1=py37he774522_0
  - matplotlib=3.0.3=py37hc8f65d3_0
  - mistune=0.8.4=py37he774522_0
  - mkl=2019.3=203
  - mkl_fft=1.0.10=py37h14836fe_0
  - mkl_random=1.0.2=py37h343c172_0
  - msys2-conda-epoch=20160418=1
  - nbconvert=5.4.1=py37_3
  - nbformat=4.4.0=py37_0
  - nbsphinx=0.4.2=py_0
  - notebook=5.7.8=py37_0
  - numpy=1.16.3=py37h19fb1c0_0
  - numpy-base=1.16.3=py37hc3f5095_0
  - openssl=1.1.1b=he774522_1
  - packaging=19.0=py_0
  - pandoc=2.1.3=0
  - pandocfilters=1.4.2=py37_1
  - parso=0.4.0=py_0
  - pickleshare=0.7.5=py37_0
  - pip=19.1=py37_0
  - prometheus_client=0.6.0=py37_0
  - prompt_toolkit=2.0.9=py37_0
  - pycparser=2.19=py37_1
  - pygments=2.3.1=py37_0
  - pyopenssl=19.0.0=py37_0
  - pyparsing=2.4.0=py_0
  - pyqt=5.9.2=py37h6538335_2
  - pyrsistent=0.14.11=py37he774522_0
  - pysocks=1.6.8=py37_1002
  - python=3.7.3=h8c8aaf0_1
  - python-dateutil=2.8.0=py37_0
  - pytz=2019.1=py_0
  - pywinpty=0.5.5=py37_1000
  - pyzmq=18.0.0=py37ha925a31_0
  - qt=5.9.7=vc14h73c81de_0
  - qtconsole=4.4.3=py37_0
  - requests=2.21.0=py37_1000
  - send2trash=1.5.0=py37_0
  - setuptools=41.0.0=py37_0
  - sip=4.19.8=py37h6538335_0
  - six=1.12.0=py37_0
  - sphinxcontrib-applehelp=1.0.1=py_0
  - sphinxcontrib-devhelp=1.0.1=py_0
  - sphinxcontrib-htmlhelp=1.0.2=py_0
  - sphinxcontrib-jsmath=1.0.1=py_0
  - sphinxcontrib-qthelp=1.0.2=py_0
  - sphinxcontrib-serializinghtml=1.1.1=py_0
  - sqlite=3.28.0=he774522_0
  - terminado=0.8.2=py37_0
  - testpath=0.4.2=py37_0
  - tornado=6.0.2=py37he774522_0
  - traitlets=4.3.2=py37_0
  - vc=14.1=h0510ff6_4
  - vs2015_runtime=14.15.26706=h3a45250_0
  - wcwidth=0.1.7=py37_0
  - webencodings=0.5.1=py37_1
  - wheel=0.33.1=py37_0
  - widgetsnbextension=3.4.2=py37_0
  - win_inet_pton=1.1.0=py37_0
  - wincertstore=0.2=py37_0
  - winpty=0.4.3=4
  - zeromq=4.3.1=h33f27b4_3
  - zlib=1.2.11=h62dcd97_3
  - pip:
    - babel==2.6.0
    - chardet==3.0.4
    - docutils==0.14
    - idna==2.8
    - imagesize==1.1.0
    - jupytext==1.1.1
    - mock==2.0.0
    - numpydoc==0.9.1
    - pbr==5.2.0
    - pyyaml==5.1
    - snowballstemmer==1.2.1
    - sphinx==1.8.4
    - sphinx-rtd-theme==0.4.3
    - sphinxcontrib-websupport==1.1.0
    - testfixtures==6.7.0
    - urllib3==1.24.2

Create the conda env with:

conda env create -f environment.yml

For some reason I had to pip-install sphinx-rtd-theme manually afterwards..

alexander-ding commented 5 years ago

Getting an error here...

$ conda env create -f environment.yml

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/anaconda3/lib/python3.7/site-packages/conda/exceptions.py", line 1043, in __call__
        return func(*args, **kwargs)
      File "/anaconda3/lib/python3.7/site-packages/conda_env/cli/main.py", line 73, in do_call
        exit_code = getattr(module, func_name)(args, parser)
      File "/anaconda3/lib/python3.7/site-packages/conda_env/cli/main_create.py", line 77, in execute
        directory=os.getcwd())
      File "/anaconda3/lib/python3.7/site-packages/conda_env/specs/__init__.py", line 40, in detect
        if spec.can_handle():
      File "/anaconda3/lib/python3.7/site-packages/conda_env/specs/yaml_file.py", line 18, in can_handle
        self._environment = env.from_file(self.filename)
      File "/anaconda3/lib/python3.7/site-packages/conda_env/env.py", line 144, in from_file
        return from_yaml(yamlstr, filename=filename)
      File "/anaconda3/lib/python3.7/site-packages/conda_env/env.py", line 130, in from_yaml
        data = validate_keys(data, kwargs)
      File "/anaconda3/lib/python3.7/site-packages/conda_env/env.py", line 35, in validate_keys
        for key in data.keys():
    AttributeError: 'NoneType' object has no attribute 'keys'
rsokl commented 5 years ago

This seems like a conda bug. Have you updated conda recently?

alexander-ding commented 5 years ago

Just updated and it works! Consider closing?

alexander-ding commented 5 years ago

By the way, we should probably verify that builds work too--I don't know what command to run atm. it'd be great if you could also include this information on readme.md.

EDIT

I got it to work by running ./Python/make.bat html, but then the build_to_doc.py fails because assert (root/"Python"/"_build"/".nojekyll").is_file() fails (my _build doesn't generate that file. Right now, I have to manually install jupytext and sphinx-rtd-theme after the conda env setup. Let me know if I'm doing this right.

alexander-ding commented 5 years ago

Just a separate note, I cannot use this on a different platform (like my Mac). Upon doing some research, this is expected conda behavior as the same packages and versions are rarely available across platforms. To make it platform-agnostic, consider conda-devenv or maybe just a regular pip requirements.txt file?