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

"unyt.exceptions" #2685

Closed
Provider10 opened this issue Jun 24, 2020 · 12 comments
Closed

"unyt.exceptions" #2685

Provider10 opened this issue Jun 24, 2020 · 12 comments
Labels
triage Triage needed

Comments

@Provider10
Copy link
Contributor

Provider10 commented Jun 24, 2020

Bug report

Bug summary

On nightly build, when importing yt, the following error comes up: "No module named 'unyt'" I assume this is just a typo?

Code for reproduction

import yt

Actual outcome

Screen Shot 2020-06-24 at 4 28 38 PM

# If applicable, paste the console output here
#
#
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-2d2292a375dc> in <module>
----> 1 import yt

~/repos/yt-git/yt/__init__.py in <module>
     18 import numpy # In case anyone wishes to use it by name
     19 
---> 20 from yt.funcs import \
     21     iterable, \
     22     get_memory_usage, \

~/repos/yt-git/yt/funcs.py in <module>
     27 from yt.utilities.logger import ytLogger as mylog
     28 from yt.utilities.lru_cache import lru_cache
---> 29 from yt.utilities.exceptions import YTInvalidWidthError
     30 from yt.extern.tqdm import tqdm
     31 from yt.units import YTArray, YTQuantity

~/repos/yt-git/yt/utilities/exceptions.py in <module>
      3 import os.path
      4 
----> 5 from unyt.exceptions import UnitOperationError
      6 
      7 class YTException(Exception):

Expected outcome

Version Information

  • Operating System:
  • Python Version: 3.7.7
  • yt version: Latest nightly build
  • Other Libraries (if applicable):

Conda installed, updated to version 3.4.1 . Channel py37h33eb3a4_2
conda install -c yt-project/label/dev

@triage-new-issues triage-new-issues bot added the triage Triage needed label Jun 24, 2020
Xarthisius added a commit to Xarthisius/conda-dev that referenced this issue Jun 24, 2020
@Xarthisius
Copy link
Member

Xarthisius commented Jun 24, 2020

Hi @Provider10 and thanks for the report! I'll fix the build asap. In the meantime you can do conda -c conda-forge install unyt to fix this.

Xarthisius added a commit to Xarthisius/conda-dev that referenced this issue Jun 24, 2020
@Xarthisius
Copy link
Member

I just checked and conda nightlies haven't been built for past 9 months. I'm not sure how did you end up with that state.
I'd suggest removing conda package and installing yt straight via pip:

pip install git+https://github.com/yt-project/yt@master

@Provider10
Copy link
Contributor Author

Hi @Xarthisius. Thanks! I got that from the README that's included in this branch. Perhaps that is something that should be included? Or is this build still useful somehow? Thanks again!

@Provider10
Copy link
Contributor Author

I just checked and conda nightlies haven't been built for past 9 months. I'm not sure how did you end up with that state.
I'd suggest removing conda package and installing yt straight via pip:

pip install git+https://github.com/yt-project/yt@master

Hi @Xarthisius. So I used the above command and I still can't seem to actually import yt. The error I'm getting is: "ModuleNotFoundError: No module named 'yt.utilities.lib.ewah_bool_wrap'". This is actually a similar error that I'm getting whenever I try to build from the developmental version as described in the README.

I recognize that this is more tech support and that this isn't the proper spot for it, but since it directly comes from something in this thread I wanted to just follow up. I'm happy to move this to wherever is appropriate, such as the slack channel. Thanks again! I really appreciate it.

@matthewturk
Copy link
Member

matthewturk commented Jun 25, 2020 via email

@Provider10
Copy link
Contributor Author

Hi @matthewturk. Totally! I'm still fairly new, to this, so can you tell me what EWAH means at some point? This is on Linux x86_64 (64 bit) on a shared machine (is this the info you wanted?). If you need anymore info, please let me know! Since I get something similar when I try to use the dev version as described in the README, would you like me to describe that too? It doesn't directly follow the above but the errors are similar Thanks!

Pip output:

$ pip install git+https://github.com/yt-project/yt@master --user
Collecting git+https://github.com/yt-project/yt@master
  Cloning https://github.com/yt-project/yt (to revision master) to /tmp/pip-req-build-ymow1iqt
  Running command git clone -q https://github.com/yt-project/yt /tmp/pip-req-build-ymow1iqt
  Running command git submodule update --init --recursive -q
Requirement already satisfied: matplotlib>=1.5.3 in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from yt==4.0.dev0) (3.1.0)
Requirement already satisfied: setuptools>=19.6 in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from yt==4.0.dev0) (41.0.1)
Requirement already satisfied: sympy>=1.2 in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from yt==4.0.dev0) (1.4)
Requirement already satisfied: numpy>=1.10.4 in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from yt==4.0.dev0) (1.16.4)
Requirement already satisfied: IPython>=1.0 in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from yt==4.0.dev0) (7.6.1)
Collecting unyt>=2.2.2 (from yt==4.0.dev0)
  Using cached https://files.pythonhosted.org/packages/bf/32/7a3565926edbcb8951a6dcdf83bca4bb6be7d9c6374a7b27876f3ddb6bd2/unyt-2.7.1-py2.py3-none-any.whl
Requirement already satisfied: cycler>=0.10 in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from matplotlib>=1.5.3->yt==4.0.dev0) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from matplotlib>=1.5.3->yt==4.0.dev0) (1.1.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from matplotlib>=1.5.3->yt==4.0.dev0) (2.4.0)
Requirement already satisfied: python-dateutil>=2.1 in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from matplotlib>=1.5.3->yt==4.0.dev0) (2.8.0)
Requirement already satisfied: mpmath>=0.19 in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from sympy>=1.2->yt==4.0.dev0) (1.1.0)
Requirement already satisfied: decorator in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from IPython>=1.0->yt==4.0.dev0) (4.4.0)
Requirement already satisfied: traitlets>=4.2 in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from IPython>=1.0->yt==4.0.dev0) (4.3.2)
Requirement already satisfied: prompt-toolkit<2.1.0,>=2.0.0 in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from IPython>=1.0->yt==4.0.dev0) (2.0.9)
Requirement already satisfied: pygments in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from IPython>=1.0->yt==4.0.dev0) (2.4.2)
Requirement already satisfied: pexpect; sys_platform != "win32" in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from IPython>=1.0->yt==4.0.dev0) (4.7.0)
Requirement already satisfied: jedi>=0.10 in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from IPython>=1.0->yt==4.0.dev0) (0.13.3)
Requirement already satisfied: backcall in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from IPython>=1.0->yt==4.0.dev0) (0.1.0)
Requirement already satisfied: pickleshare in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from IPython>=1.0->yt==4.0.dev0) (0.7.5)
Requirement already satisfied: six in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from cycler>=0.10->matplotlib>=1.5.3->yt==4.0.dev0) (1.12.0)
Requirement already satisfied: ipython-genutils in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from traitlets>=4.2->IPython>=1.0->yt==4.0.dev0) (0.2.0)
Requirement already satisfied: wcwidth in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from prompt-toolkit<2.1.0,>=2.0.0->IPython>=1.0->yt==4.0.dev0) (0.1.7)
Requirement already satisfied: ptyprocess>=0.5 in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from pexpect; sys_platform != "win32"->IPython>=1.0->yt==4.0.dev0) (0.6.0)
Requirement already satisfied: parso>=0.3.0 in /data/gnedin/soft/anaconda3/lib/python3.7/site-packages (from jedi>=0.10->IPython>=1.0->yt==4.0.dev0) (0.5.0)
Building wheels for collected packages: yt
  Building wheel for yt (setup.py) ... done
  Stored in directory: /tmp/pip-ephem-wheel-cache-t4u77gb9/wheels/ff/be/bb/170bb72996e16ec1be87068cb8716d5ef9fe12bd00bf2b0228
Successfully built yt
Installing collected packages: unyt, yt
Successfully installed unyt-2.7.1 yt-4.0.dev0

@matthewturk
Copy link
Member

@Provider10 so EWAH means "enhanced word aligned hybrid" -- it's the bitmap indexing we use to track locations of particles on disk to optimize IO. And from the output, I don't see why it's not actually building, or why it won't import. Additionally, linux 64 should be totally good to go; we've had troubles with 32 bit on Windows, but 64 linux should be fine.

Unfortunately I can't tell where yt is installed on disk from this output, but it would be very helpful if we could get the output of ls -l yt/utilities/lib/ewah* from the directory it was installed into. This is usually some variant of lib/python3.7/site-packages/yt or something like that.

@Provider10
Copy link
Contributor Author

Totally:

$ ls -l yt/utilities/lib/ewah*
-rw-rw-r-- 1 rnoorali rnoorali    3657 Jun 25 12:55 yt/utilities/lib/ewah_bool_array.pxd
-rw-rw-r-- 1 rnoorali rnoorali 2249815 Jun 25 12:55 yt/utilities/lib/ewah_bool_wrap.cpp
-rw-rw-r-- 1 rnoorali rnoorali    7739 Jun 25 12:55 yt/utilities/lib/ewah_bool_wrap.pxd
-rw-rw-r-- 1 rnoorali rnoorali   73143 Jun 25 12:55 yt/utilities/lib/ewah_bool_wrap.pyx

yt/utilities/lib/ewahboolarray:
total 132
-rw-rw-r-- 1 rnoorali rnoorali 13449 Jun 25 12:55 boolarray.h
-rw-rw-r-- 1 rnoorali rnoorali 77675 Jun 25 12:55 ewah.h
-rw-rw-r-- 1 rnoorali rnoorali  5710 Jun 25 12:55 ewahutil.h
-rw-rw-r-- 1 rnoorali rnoorali 10273 Jun 25 12:55 LICENSE
-rw-rw-r-- 1 rnoorali rnoorali   251 Jun 25 12:55 README
-rw-rw-r-- 1 rnoorali rnoorali 16045 Jun 25 12:55 runninglengthword.h

@matthewturk
Copy link
Member

So I think that it is likely not building it. It might need the --std=c++11 argument which @jzuhone had to do recently on a linux machine.

Copy link
Contributor

jzuhone commented Jun 25, 2020

Yes, I plan on submitting a PR for this today.

@Provider10
Copy link
Contributor Author

Provider10 commented Jul 24, 2020

Hi @matthewturk !

Since this issue stems from previous discussions I wanted to put it here. If you'd like me to create a new issue, let me know.

I have a Conda environment with yt installed with pip install git+https://github.com/yt-project/yt@master. When importing yt in iPython, I get the following error: "No module named 'yt.utilities.lib.misc_utilities'"

Linux version: CentOS Linux 7 (Core) x86-64
Pip output:

$ pip install git+https://github.com/yt-project/yt@master
Collecting git+https://github.com/yt-project/yt@master
  Cloning https://github.com/yt-project/yt (to revision master) to /tmp/pip-req-build-_w264ma6
  Running command git clone -q https://github.com/yt-project/yt /tmp/pip-req-build-_w264ma6
  Running command git submodule update --init --recursive -q
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: numpy>=1.10.4 in ./.conda/envs/ytgit/lib/python3.8/site-packages (from yt==4.0.dev0) (1.18.5)
Collecting sympy>=1.2
  Downloading sympy-1.6.1-py3-none-any.whl (5.8 MB)
     |████████████████████████████████| 5.8 MB 4.5 MB/s 
Collecting matplotlib>=1.5.3
  Downloading matplotlib-3.3.0-1-cp38-cp38-manylinux1_x86_64.whl (11.5 MB)
     |████████████████████████████████| 11.5 MB 96.0 MB/s 
Collecting unyt>=2.7.2
  Downloading unyt-2.7.2-py2.py3-none-any.whl (97 kB)
     |████████████████████████████████| 97 kB 4.3 MB/s 
Requirement already satisfied: setuptools>=19.6 in ./.conda/envs/ytgit/lib/python3.8/site-packages (from yt==4.0.dev0) (49.2.0.post20200714)
Collecting IPython>=1.0
  Downloading ipython-7.16.1-py3-none-any.whl (785 kB)
     |████████████████████████████████| 785 kB 99.0 MB/s 
Collecting mpmath>=0.19
  Downloading mpmath-1.1.0.tar.gz (512 kB)
     |████████████████████████████████| 512 kB 97.3 MB/s 
Collecting kiwisolver>=1.0.1
  Downloading kiwisolver-1.2.0-cp38-cp38-manylinux1_x86_64.whl (92 kB)
     |████████████████████████████████| 92 kB 49 kB/s 
Collecting python-dateutil>=2.1
  Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
     |████████████████████████████████| 227 kB 93.9 MB/s 
Collecting cycler>=0.10
  Downloading cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
Collecting pillow>=6.2.0
  Downloading Pillow-7.2.0-cp38-cp38-manylinux1_x86_64.whl (2.2 MB)
     |████████████████████████████████| 2.2 MB 93.4 MB/s 
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3
  Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
     |████████████████████████████████| 67 kB 3.9 MB/s 
Collecting backcall
  Downloading backcall-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting decorator
  Downloading decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
Collecting prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0
  Downloading prompt_toolkit-3.0.5-py3-none-any.whl (351 kB)
     |████████████████████████████████| 351 kB 90.8 MB/s 
Collecting pexpect; sys_platform != "win32"
  Downloading pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
     |████████████████████████████████| 59 kB 4.3 MB/s 
Collecting jedi>=0.10
  Downloading jedi-0.17.2-py2.py3-none-any.whl (1.4 MB)
     |████████████████████████████████| 1.4 MB 99.1 MB/s 
Collecting pygments
  Downloading Pygments-2.6.1-py3-none-any.whl (914 kB)
     |████████████████████████████████| 914 kB 87.0 MB/s 
Collecting traitlets>=4.2
  Downloading traitlets-4.3.3-py2.py3-none-any.whl (75 kB)
     |████████████████████████████████| 75 kB 2.8 MB/s 
Collecting pickleshare
  Downloading pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Requirement already satisfied: six>=1.5 in ./.conda/envs/ytgit/lib/python3.8/site-packages (from python-dateutil>=2.1->matplotlib>=1.5.3->yt==4.0.dev0) (1.15.0)
Collecting wcwidth
  Downloading wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting ptyprocess>=0.5
  Downloading ptyprocess-0.6.0-py2.py3-none-any.whl (39 kB)
Collecting parso<0.8.0,>=0.7.0
  Downloading parso-0.7.1-py2.py3-none-any.whl (109 kB)
     |████████████████████████████████| 109 kB 112.8 MB/s 
Collecting ipython-genutils
  Downloading ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)
Building wheels for collected packages: yt, mpmath
  Building wheel for yt (PEP 517) ... done
  Created wheel for yt: filename=yt-4.0.dev0-py3-none-any.whl size=1841385 sha256=0e0109bcd4d50c658fdae07725651718d34df73b288307887d1efcbd4312c4e1
  Stored in directory: /tmp/pip-ephem-wheel-cache-2cfe014_/wheels/a0/06/d7/125c740d77258e011b6b1aa5dfa82e3ab35b0eeb4545b9c605
  Building wheel for mpmath (setup.py) ... done
  Created wheel for mpmath: filename=mpmath-1.1.0-py3-none-any.whl size=532239 sha256=86540d5f71e0306b74993db5fe0936133e64910635c7d1029552aa65971522bf
  Stored in directory: /home/rnoorali/.cache/pip/wheels/29/2c/1c/d2e4580cde2743b0aef389e936ac21a2db92921ddbca53faa1
Successfully built yt mpmath
Installing collected packages: mpmath, sympy, kiwisolver, python-dateutil, cycler, pillow, pyparsing, matplotlib, unyt, backcall, decorator, wcwidth, prompt-toolkit, ptyprocess, pexpect, parso, jedi, pygments, ipython-genutils, traitlets, pickleshare, IPython, yt
Successfully installed IPython-7.16.1 backcall-0.2.0 cycler-0.10.0 decorator-4.4.2 ipython-genutils-0.2.0 jedi-0.17.2 kiwisolver-1.2.0 matplotlib-3.3.0 mpmath-1.1.0 parso-0.7.1 pexpect-4.8.0 pickleshare-0.7.5 pillow-7.2.0 prompt-toolkit-3.0.5 ptyprocess-0.6.0 pygments-2.6.1 pyparsing-2.4.7 python-dateutil-2.8.1 sympy-1.6.1 traitlets-4.3.3 unyt-2.7.2 wcwidth-0.2.5 yt-4.0.dev0

Other output (how is best to classify this?)

$ ls -l yt/utilities/lib/ewah*
-rw-rw-r-- 1 rnoorali rnoorali  3666 Jul 24 16:36 yt/utilities/lib/ewah_bool_array.pxd
-rw-rw-r-- 1 rnoorali rnoorali  7739 Jul 24 16:36 yt/utilities/lib/ewah_bool_wrap.pxd
-rw-rw-r-- 1 rnoorali rnoorali 73248 Jul 24 16:36 yt/utilities/lib/ewah_bool_wrap.pyx

yt/utilities/lib/ewahboolarray:
total 768
-rw-rw-r-- 1 rnoorali rnoorali 13449 Jul 24 16:36 boolarray.h
-rw-rw-r-- 1 rnoorali rnoorali 77675 Jul 24 16:36 ewah.h
-rw-rw-r-- 1 rnoorali rnoorali  5710 Jul 24 16:36 ewahutil.h
-rw-rw-r-- 1 rnoorali rnoorali 10273 Jul 24 16:36 LICENSE
-rw-rw-r-- 1 rnoorali rnoorali   251 Jul 24 16:36 README
-rw-rw-r-- 1 rnoorali rnoorali 16045 Jul 24 16:36 runninglengthword.h

@Provider10
Copy link
Contributor Author

Brought back up in Issue 2892 where it's a little bit cleaner. Since the main issue here was solved, recommending closing.

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

No branches or pull requests

4 participants