Error when applying (pysph test)

200 views
Skip to first unread message

Bader Nasser

unread,
Jun 6, 2019, 12:19:47 AM6/6/19
to pysph-users
Hi,

I need some help with installing Pysph. As I was testing after installing Pysph and all dependencies, I'm getting the following message:
E   ModuleNotFoundError: No module named 'stl'



**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.0
** Copyright (c) 2019 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86_x64'

C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools>pysph test
================================================= test session starts =================================================
platform win32 -- Python 3.7.3, pytest-4.6.2, py-1.8.0, pluggy-0.12.0
rootdir: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
plugins: arraydiff-0.3, doctestplus-0.3.0, openfiles-0.3.2, remotedata-0.3.1
collected 1027 items / 1 errors / 1026 selected

======================================================= ERRORS ========================================================
__________________________________ ERROR collecting tools/tests/test_geometry_stl.py __________________________________
ImportError while importing test module 'C:\Users\bader\Anaconda3\lib\site-packages\pysph\tools\tests\test_geometry_stl.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
C:\Users\bader\Anaconda3\lib\site-packages\pysph\tools\tests\test_geometry_stl.py:5: in <module>
    import pysph.tools.geometry_stl as G
pysph\tools\geometry_stl.pyx:4: in init pysph.tools.geometry_stl
    ???
E   ModuleNotFoundError: No module named 'stl'
================================================== warnings summary ===================================================
C:\Users\bader\Anaconda3\lib\site-packages\_pytest\mark\structures.py:245
C:\Users\bader\Anaconda3\lib\site-packages\_pytest\mark\structures.py:245
  C:\Users\bader\Anaconda3\lib\site-packages\_pytest\mark\structures.py:245: PytestCollectionWarning: cannot collect 'test_all_backends' because it is not a function.
    def __call__(self, *args, **kwargs):

C:\Users\bader\Anaconda3\lib\site-packages\_pytest\mark\structures.py:337
C:\Users\bader\Anaconda3\lib\site-packages\_pytest\mark\structures.py:337
  C:\Users\bader\Anaconda3\lib\site-packages\_pytest\mark\structures.py:337: PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

C:\Users\bader\Anaconda3\lib\site-packages\_pytest\mark\structures.py:337
C:\Users\bader\Anaconda3\lib\site-packages\_pytest\mark\structures.py:337
  C:\Users\bader\Anaconda3\lib\site-packages\_pytest\mark\structures.py:337: PytestUnknownMarkWarning: Unknown pytest.mark.parallel - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

C:\Users\bader\Anaconda3\lib\site-packages\_pytest\cacheprovider.py:127
  C:\Users\bader\Anaconda3\lib\site-packages\_pytest\cacheprovider.py:127: PytestCacheWarning: could not create cache path C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\.pytest_cache\v\cache\stepwise
    self.warn("could not create cache path {path}", path=path)

C:\Users\bader\Anaconda3\lib\site-packages\_pytest\cacheprovider.py:127
  C:\Users\bader\Anaconda3\lib\site-packages\_pytest\cacheprovider.py:127: PytestCacheWarning: could not create cache path C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\.pytest_cache\v\cache\nodeids
    self.warn("could not create cache path {path}", path=path)

C:\Users\bader\Anaconda3\lib\site-packages\_pytest\cacheprovider.py:127
  C:\Users\bader\Anaconda3\lib\site-packages\_pytest\cacheprovider.py:127: PytestCacheWarning: could not create cache path C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\.pytest_cache\v\cache\lastfailed
    self.warn("could not create cache path {path}", path=path)

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================= 9 warnings, 1 error in 3.07 seconds =========================================

C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools>

Prabhu Ramachandran

unread,
Jun 12, 2019, 1:37:47 PM6/12/19
to Bader Nasser, pysph-users
On 6/6/19 9:49 AM, Bader Nasser wrote:
Hi,

I need some help with installing Pysph. As I was testing after installing Pysph and all dependencies, I'm getting the following message:
E   ModuleNotFoundError: No module named 'stl'

This is fixed in master but if you installed pysph from pypi then you should also install numpy-stl.  pip install numpy-stl and that should fix this test error.

cheers,

Prabhu

Stephan

unread,
May 28, 2021, 4:34:57 PM5/28/21
to pysph-users
Dear reader,

This issue dates from 2019, but I just installed PySPH via pip3 and got the same problem so apparently this issue is still there. Luckily, pip3 install NumPy-stl solved the issue. I did install all dependencies as mentioned in the installation guide before trying to run the tests. Unfortunately, this was not the only problem. After installing numpy-stl I was able to run the pysph test and 17 fails showed up. I suppose there are more packages missing. Is it possible to update the dependencies list for installing and using pysph on Ubuntu 20.04?

Kind regards,

Stephan

Op woensdag 12 juni 2019 om 19:37:47 UTC+2 schreef Prabhu Ramachandran:
Reply all
Reply to author
Forward
0 new messages