Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

test with custom conda environment #49

Merged
merged 5 commits into from
Aug 27, 2019
Merged

test with custom conda environment #49

merged 5 commits into from
Aug 27, 2019

Conversation

prjemian
Copy link
Contributor

For testing, I really want a dedicated virtual environment. Avoid requirements conflicts that way. BUT, there is no PyQt5 conda package that matches requirements (yet):

PackagesNotFoundError: The following packages are not available from current channels:

  - pyqt5[version='>=5.8']

Current channels:

  - https://conda.anaconda.org/lightsource2-tag/linux-64
  - https://conda.anaconda.org/lightsource2-tag/noarch
  - https://conda.anaconda.org/prjemian/linux-64
  - https://conda.anaconda.org/prjemian/noarch
  - https://repo.anaconda.com/pkgs/main/linux-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/free/linux-64
  - https://repo.anaconda.com/pkgs/free/noarch
  - https://repo.anaconda.com/pkgs/r/linux-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://conda.anaconda.org/conda-forge/linux-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://conda.anaconda.org/aps-anl-tag/linux-64
  - https://conda.anaconda.org/aps-anl-tag/noarch
  - https://conda.anaconda.org/aps-anl-dev/linux-64
  - https://conda.anaconda.org/aps-anl-dev/noarch

Can requirement be relaxed to fit what is available? Looks as if pyqt5 5.6 is latest for linux-x86_64. PyPI has 5.13 today.

@prjemian prjemian added the enhancement New feature or request label Aug 14, 2019
@prjemian prjemian requested a review from mrakitin August 14, 2019 19:23
@prjemian prjemian marked this pull request as ready for review August 14, 2019 19:23
@mrakitin
Copy link
Member

mrakitin commented Aug 14, 2019

@prjemian, I think the name of the package on anaconda.org is pyqt, not pyqt5: https://anaconda.org/anaconda/pyqt.

EDIT: corrected the link to refer to the defaults channel.

@prjemian
Copy link
Contributor Author

Agreed. Going with this conda env setup for now:

conda create -n bluesky_browser python=3 bluesky jsonschema matplotlib ophyd pyzmq qtpy suitcase-jsonl tornado traitlets  -c lightsource2-tag

which shows (in agreement with https://anaconda.org/search?q=pyqt)

  pyqt               pkgs/main/linux-64::pyqt-5.9.2-py37h05f1152_2

then:

pip install -e .

which downloads and builds lots of packages. We'll see if pip tries to update the conda-installed pyqt on my RHEL system today. Yesterday, on my linuxmint system, pip tried to update pyqt which led to version conflicts and the demo would not run. Should not have tried that within my standard bluesky environment.

(base) jemian@otz ~/sandbox/bluesky-browser $ conda activate bluesky_browser
(bluesky_browser) jemian@otz ~/sandbox/bluesky-browser $ pip install -e .
Obtaining file:///home/oxygen18/JEMIAN/sandbox/bluesky-browser
Requirement already satisfied: bluesky in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from bluesky-browser==0.1.0a2) (1.5.4)
Requirement already satisfied: event-model>=1.9.0a3 in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from bluesky-browser==0.1.0a2) (1.11.1)
Collecting intake>=0.5.1 (from bluesky-browser==0.1.0a2)
Collecting intake-bluesky>=0.1.0a5 (from bluesky-browser==0.1.0a2)
  Using cached https://files.pythonhosted.org/packages/c7/fd/6bdddcb6745353c44300cf7be8acddd65efd7577a8a4e2f0f146edffa3be/intake_bluesky-0.1.0a10-py3-none-any.whl
Requirement already satisfied: jsonschema in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from bluesky-browser==0.1.0a2) (3.0.1)
Requirement already satisfied: matplotlib in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from bluesky-browser==0.1.0a2) (3.1.0)
Requirement already satisfied: ophyd in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from bluesky-browser==0.1.0a2) (1.3.3)
Collecting pyqt5>=5.8 (from bluesky-browser==0.1.0a2)
  Using cached https://files.pythonhosted.org/packages/85/bd/8a0c863802449f35ad9ca21a1b73190639c206758b4b5e2425617fc99ce9/PyQt5-5.13.0-5.13.0-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl
Requirement already satisfied: pyzmq in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from bluesky-browser==0.1.0a2) (18.0.0)
Requirement already satisfied: qtpy in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from bluesky-browser==0.1.0a2) (1.8.0)
Requirement already satisfied: suitcase-jsonl in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from bluesky-browser==0.1.0a2) (0.1.1)
Requirement already satisfied: tornado in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from bluesky-browser==0.1.0a2) (6.0.3)
Requirement already satisfied: traitlets in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from bluesky-browser==0.1.0a2) (4.3.2)
Requirement already satisfied: cycler in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from bluesky->bluesky-browser==0.1.0a2) (0.10.0)
Requirement already satisfied: historydict in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from bluesky->bluesky-browser==0.1.0a2) (1.2.3)
Requirement already satisfied: numpy in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from bluesky->bluesky-browser==0.1.0a2) (1.16.4)
Requirement already satisfied: super_state_machine in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from bluesky->bluesky-browser==0.1.0a2) (1.0)
Requirement already satisfied: toolz in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from bluesky->bluesky-browser==0.1.0a2) (0.10.0)
Requirement already satisfied: tqdm in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from bluesky->bluesky-browser==0.1.0a2) (4.32.1)
Requirement already satisfied: requests in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from intake>=0.5.1->bluesky-browser==0.1.0a2) (2.22.0)
Requirement already satisfied: msgpack in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from intake>=0.5.1->bluesky-browser==0.1.0a2) (0.6.1)
Collecting entrypoints (from intake>=0.5.1->bluesky-browser==0.1.0a2)
  Using cached https://files.pythonhosted.org/packages/ac/c6/44694103f8c221443ee6b0041f69e2740d89a25641e62fb4f2ee568f2f9c/entrypoints-0.3-py2.py3-none-any.whl
Requirement already satisfied: pyyaml in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from intake>=0.5.1->bluesky-browser==0.1.0a2) (5.1.1)
Collecting appdirs (from intake>=0.5.1->bluesky-browser==0.1.0a2)
  Using cached https://files.pythonhosted.org/packages/56/eb/810e700ed1349edde4cbdc1b2a21e28cdf115f9faf263f6bbf8447c1abf3/appdirs-1.4.3-py2.py3-none-any.whl
Requirement already satisfied: jinja2 in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from intake>=0.5.1->bluesky-browser==0.1.0a2) (2.10.1)
Requirement already satisfied: dask[bag]>=1.0 in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from intake>=0.5.1->bluesky-browser==0.1.0a2) (2.2.0)
Requirement already satisfied: fsspec in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from intake>=0.5.1->bluesky-browser==0.1.0a2) (0.4.0)
Collecting intake-xarray (from intake-bluesky>=0.1.0a5->bluesky-browser==0.1.0a2)
Collecting xarray (from intake-bluesky>=0.1.0a5->bluesky-browser==0.1.0a2)
  Using cached https://files.pythonhosted.org/packages/43/75/551eb05ad53b4894eda22548a6379b8529a4a84de3dfafe899dd08c889c2/xarray-0.12.3-py2.py3-none-any.whl
Requirement already satisfied: pandas in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from intake-bluesky>=0.1.0a5->bluesky-browser==0.1.0a2) (0.25.0)
Requirement already satisfied: pymongo in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from intake-bluesky>=0.1.0a5->bluesky-browser==0.1.0a2) (3.8.0)
Requirement already satisfied: mongoquery in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from intake-bluesky>=0.1.0a5->bluesky-browser==0.1.0a2) (1.1.0)
Collecting msgpack-numpy (from intake-bluesky>=0.1.0a5->bluesky-browser==0.1.0a2)
  Using cached https://files.pythonhosted.org/packages/c8/ab/09904a909bccc471f219fb8f5d0838cbcb10cc26089a2b29e84c893e216e/msgpack_numpy-0.4.4.3-py2.py3-none-any.whl
Requirement already satisfied: attrs>=17.4.0 in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from jsonschema->bluesky-browser==0.1.0a2) (19.1.0)
Requirement already satisfied: pyrsistent>=0.14.0 in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from jsonschema->bluesky-browser==0.1.0a2) (0.14.11)
Requirement already satisfied: setuptools in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from jsonschema->bluesky-browser==0.1.0a2) (41.0.1)
Requirement already satisfied: six>=1.11.0 in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from jsonschema->bluesky-browser==0.1.0a2) (1.12.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from matplotlib->bluesky-browser==0.1.0a2) (1.1.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from matplotlib->bluesky-browser==0.1.0a2) (2.4.0)
Requirement already satisfied: python-dateutil>=2.1 in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from matplotlib->bluesky-browser==0.1.0a2) (2.8.0)
Requirement already satisfied: networkx>=2.0 in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from ophyd->bluesky-browser==0.1.0a2) (2.3)
Requirement already satisfied: pyepics in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from ophyd->bluesky-browser==0.1.0a2) (3.4.0)
Collecting PyQt5_sip<13,>=4.19.14 (from pyqt5>=5.8->bluesky-browser==0.1.0a2)
  Using cached https://files.pythonhosted.org/packages/ec/7d/c8d2326c405cfed1858af83915fa02ba9e9722ae3e0343df0950fd900039/PyQt5_sip-4.19.18-cp37-cp37m-manylinux1_x86_64.whl
Requirement already satisfied: suitcase-utils in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from suitcase-jsonl->bluesky-browser==0.1.0a2) (0.1.1)
Requirement already satisfied: decorator in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from traitlets->bluesky-browser==0.1.0a2) (4.4.0)
Requirement already satisfied: ipython-genutils in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from traitlets->bluesky-browser==0.1.0a2) (0.2.0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from requests->intake>=0.5.1->bluesky-browser==0.1.0a2) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from requests->intake>=0.5.1->bluesky-browser==0.1.0a2) (1.24.2)
Requirement already satisfied: certifi>=2017.4.17 in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from requests->intake>=0.5.1->bluesky-browser==0.1.0a2) (2019.6.16)
Requirement already satisfied: idna<2.9,>=2.5 in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from requests->intake>=0.5.1->bluesky-browser==0.1.0a2) (2.8)
Requirement already satisfied: MarkupSafe>=0.23 in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from jinja2->intake>=0.5.1->bluesky-browser==0.1.0a2) (1.1.1)
Requirement already satisfied: partd>=0.3.10; extra == "bag" in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from dask[bag]>=1.0->intake>=0.5.1->bluesky-browser==0.1.0a2) (1.0.0)
Requirement already satisfied: cloudpickle>=0.2.1; extra == "bag" in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from dask[bag]>=1.0->intake>=0.5.1->bluesky-browser==0.1.0a2) (1.2.1)
Collecting zarr (from intake-xarray->intake-bluesky>=0.1.0a5->bluesky-browser==0.1.0a2)
Collecting netcdf4 (from intake-xarray->intake-bluesky>=0.1.0a5->bluesky-browser==0.1.0a2)
  Using cached https://files.pythonhosted.org/packages/c3/31/2b26e1a5df5aef4a4da6e7e5f817155a84e7893b5922ffc82677ae9cabd4/netCDF4-1.5.1.2-cp37-cp37m-manylinux1_x86_64.whl
Requirement already satisfied: pytz>=2017.2 in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from pandas->intake-bluesky>=0.1.0a5->bluesky-browser==0.1.0a2) (2019.1)
Requirement already satisfied: locket in /home/oxygen18/JEMIAN/.conda/envs/bluesky_browser/lib/python3.7/site-packages (from partd>=0.3.10; extra == "bag"->dask[bag]>=1.0->intake>=0.5.1->bluesky-browser==0.1.0a2) (0.2.0)
Collecting asciitree (from zarr->intake-xarray->intake-bluesky>=0.1.0a5->bluesky-browser==0.1.0a2)
Collecting numcodecs>=0.6.2 (from zarr->intake-xarray->intake-bluesky>=0.1.0a5->bluesky-browser==0.1.0a2)
Collecting fasteners (from zarr->intake-xarray->intake-bluesky>=0.1.0a5->bluesky-browser==0.1.0a2)
  Using cached https://files.pythonhosted.org/packages/18/bd/55eb2d6397b9c0e263af9d091ebdb756b15756029b3cededf6461481bc63/fasteners-0.15-py2.py3-none-any.whl
Collecting cftime (from netcdf4->intake-xarray->intake-bluesky>=0.1.0a5->bluesky-browser==0.1.0a2)
  Using cached https://files.pythonhosted.org/packages/53/73/418d58cea8add0c3b3caa7d4c47fff9a4e4728f07a653ec4b6223b68a83c/cftime-1.0.3.4-cp37-cp37m-manylinux1_x86_64.whl
Collecting monotonic>=0.1 (from fasteners->zarr->intake-xarray->intake-bluesky>=0.1.0a5->bluesky-browser==0.1.0a2)
  Using cached https://files.pythonhosted.org/packages/ac/aa/063eca6a416f397bd99552c534c6d11d57f58f2e94c14780f3bbf818c4cf/monotonic-1.5-py2.py3-none-any.whl
Installing collected packages: entrypoints, appdirs, intake, asciitree, numcodecs, monotonic, fasteners, zarr, xarray, cftime, netcdf4, intake-xarray, msgpack-numpy, intake-bluesky, PyQt5-sip, pyqt5, bluesky-browser
  Running setup.py develop for bluesky-browser
Successfully installed PyQt5-sip-4.19.18 appdirs-1.4.3 asciitree-0.3.3 bluesky-browser cftime-1.0.3.4 entrypoints-0.3 fasteners-0.15 intake-0.5.3 intake-bluesky-0.1.0a10 intake-xarray-0.3.1 monotonic-1.5 msgpack-numpy-0.4.4.3 netcdf4-1.5.1.2 numcodecs-0.6.3 pyqt5-5.13.0 xarray-0.12.3 zarr-2.3.2
(bluesky_browser) jemian@otz ~/sandbox/bluesky-browser $ 

@prjemian
Copy link
Contributor Author

Finally:

bluesky-browser --demo

tl;dr works for me

@danielballan
Copy link
Member

Does this PR need to be updated, then, to deal with the discrepancy in how pip and conda spell PyQt5?

@danielballan
Copy link
Member

P.S. Thanks, both for this PR and for taking bluesky-browser out for a spin.

@prjemian
Copy link
Contributor Author

Still need to test this on system with only default channels specified. Might need to add conda-forge.

@prjemian
Copy link
Contributor Author

Does this PR need to be updated, then, to deal with the discrepancy in how pip and conda spell PyQt5?

No, that was my typo.

Copy link
Member

@mrakitin mrakitin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @prjemian! I suggested a minor change, which will make the steps logically grouped.

bluesky jsonschema matplotlib ophyd pyqt \
pyzmq qtpy suitcase-jsonl tornado traitlets \
-c lightsource2-tag
conda activate bluesky_browser
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these 2 conda commands be moved before these lines?

   git clone https://github.com/NSLS-II/bluesky-browser
   cd bluesky-browser

That will make the consequent installation steps to be in a more logical order.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely since they no longer rely on requirements.txt

@prjemian
Copy link
Contributor Author

@mrakitin, @danielballan approved. Can this be merged?

@mrakitin mrakitin merged commit f765901 into master Aug 27, 2019
@mrakitin mrakitin deleted the prjemian-patch-1 branch August 27, 2019 11:57
@prjemian
Copy link
Contributor Author

prjemian commented Aug 27, 2019 via email

@prjemian prjemian mentioned this pull request Aug 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants