Comments (12)
Thanks for the report. The problem is at the top of src/bldlib.py. Can you let me know what string you get from platform.machine() ? I am happy to get a pull request as I don't have this platform to test. Perhaps also issues in cImageD11.py.
from imaged11.
Thanks!
import platform
platform.machine()
'mips64'
from imaged11.
Sorry - still working on this - should not be closed yet...
from imaged11.
Hopefully this is ready to test now. Can you try and see if it installs for you from git please?
python3 -m pip -v install git+https://github.com/FABLE-3DXRD/ImageD11.git
If that seems good, I would suggest to try a git checkout and then run the tests:
git clone https://github.com/FABLE-3DXRD/ImageD11.git
cd ImageD11/test
python run_tests.py
There should be a lot of output, but nothing looking like a test fail.
If it seems OK to you then I will try to remember how to upload to pypi ...
from imaged11.
Thanks for the effort. I got a different error initially:
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-w210hljv/h5py/setup.py';f=getattr(tokenize, 'open', open)(__file__);co
de=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-4b6jn96a/install-record.txt --single-versi
on-externally-managed --compile" failed with error code 1 in /tmp/pip-install-w210hljv/h5py/
Exception information:Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 143, in main
status = self.run(options, args) File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line
386, in run use_user_site=options.use_user_site,
File "/usr/lib/python3/dist-packages/pip/_internal/req/__init__.py", line 49, in install_given_reqs
**kwargs File "/usr/lib/python3/dist-packages/pip/_internal/req/req_install.py", line
791, in install spinner=spinner,
File "/usr/lib/python3/dist-packages/pip/_internal/utils/misc.py", line 723, in call_subprocess
% (command_desc, proc.returncode, cwd))pip._internal.exceptions.InstallationError: Command "/usr/bin/python3 -u -c "im
port setuptools, tokenize;__file__='/tmp/pip-install-w210hljv/h5py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f
.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-4b6jn96a/install-record.txt --single-version-externally-managed --compile" fa
iled with error code 1 in /tmp/pip-install-w210hljv/h5py/
then I manually did apt install python3-h5py and run the command again, ImageD11 was successfully installed. The tests all failed:
python run_tests.py
Add "all" to command line to run all tests
HERE /home/junyue/Documents/xrd/ImageD11/test
Running suite for test_clean_mask
EEE
======================================================================
ERROR: test1 (test_clean_mask.test_clean_mask)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_clean_mask.py", line 28, in test1
npx = cImageD11.clean_mask( self.src.astype(np.int8), testmask )
AttributeError: 'module' object has no attribute 'clean_mask'
======================================================================
ERROR: test_coo (test_clean_mask.test_clean_mask)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_clean_mask.py", line 42, in test_coo
ok = cImageD11.mask_to_coo( self.target.astype(np.int8), i, j, tmp )
AttributeError: 'module' object has no attribute 'mask_to_coo'
======================================================================
ERROR: test_coo2 (test_clean_mask.test_clean_mask)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_clean_mask.py", line 52, in test_coo2
ok = cImageD11.mask_to_coo( self.src.astype(np.int8), i, j, tmp )
AttributeError: 'module' object has no attribute 'mask_to_coo'
----------------------------------------------------------------------
Ran 3 tests in 0.002s
FAILED (errors=3)
Running suite for test_closest_vec
E
======================================================================
ERROR: test_same_as_python (test_closest_vec.test_closest_vec)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_closest_vec.py", line 28, in test_same_as_python
cImageD11.closest_vec( self.data, r2 )
AttributeError: 'module' object has no attribute 'closest_vec'
----------------------------------------------------------------------
Ran 1 test in 1.081s
FAILED (errors=1)
Running suite for test_score_gvec_z
E
======================================================================
ERROR: test_same_as_python (test_score_gvec_z.test_closest_vec)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_score_gvec_z.py", line 78, in test_same_as_python
cImageD11.score_gvec_z( UBI, UB, GVE,
AttributeError: 'module' object has no attribute 'score_gvec_z'
----------------------------------------------------------------------
Ran 1 test in 0.031s
FAILED (errors=1)
Running suite for test_sym_u
...........F
======================================================================
FAIL: test_trigonal (test_sym_u.testsyms)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_sym_u.py", line 22, in test_trigonal
assert len(c.group) == 6
AssertionError
----------------------------------------------------------------------
Ran 12 tests in 2.387s
FAILED (failures=1)
Running suite for testcol
gv_general from /usr/local/lib/python2.7/dist-packages/ImageD11-1.9.0b0-py2.7-linux-mips64.egg/ImageD11/gv_general.pyc
....
----------------------------------------------------------------------
Ran 4 tests in 0.019s
OK
Running suite for test_misori
Error importing test_misori
Current folder is /home/junyue/Documents/xrd/ImageD11/test
Try removing .pyc files or __pycache__ folder if there is one
---RAISING----
Traceback (most recent call last):
File "run_tests.py", line 56, in <module>
MOD = importlib.import_module(M)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "./test_misori.py", line 3, in <module>
from ImageD11.cImageD11 import misori_cubic, misori_cubic_pairs, \
ImportError: cannot import name misori_cubic
But I can run ImageD11_gui.py, version is 1.9.7 I tried load some filtered peaks by PolyXSim, so far 'plot tth/eta' works good.
from imaged11.
Sounds like it didn't compile the c codes yet? It might work it you try again. Otherwise, can you send the output of python setup.py build
to try to track down the problem? Thanks!
from imaged11.
It is done just in one minute, some output:
changing mode of build/bdist.linux-mips64/wheel/ImageD11-1.9.7.data/scripts/peaksearch.py to 755
running install_clib
customize UnixCCompiler
adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
creating build/bdist.linux-mips64/wheel/ImageD11-1.9.7.dist-info/WHEEL
creating '/tmp/pip-wheel-vv5ljoww/ImageD11-1.9.7-cp37-cp37m-linux_mips64.whl' and adding 'build/bdist.linux-mips64/wheel' to it
adding 'ImageD11/ImageD11_file_series.py'
adding 'ImageD11/ImageD11_thread.py'
adding 'ImageD11/ImageD11options.py'
adding 'ImageD11/__init__.py'
adding 'ImageD11/blobcorrector.py'
adding 'ImageD11/cImageD11.py'
adding 'ImageD11/cImageD11_docstrings.py'
adding 'ImageD11/cImageD11_fast.cpython-37m-mips64el-linux-gnuabi64.so'
adding 'ImageD11/cImageD11_safe.cpython-37m-mips64el-linux-gnuabi64.so'
adding 'ImageD11/columnfile.py'
adding 'ImageD11/compute_fazit.py'
adding 'ImageD11/correct.py'
adding 'ImageD11/eps_sig_solver.py'
adding 'ImageD11/fft_index_refac.py'
adding 'ImageD11/finite_strain.py'
adding 'ImageD11/grain.py'
adding 'ImageD11/grid_index_parallel.py'
adding 'ImageD11/guicommand.py'
adding 'ImageD11/gv_general.py'
adding 'ImageD11/indexer.py'
adding 'ImageD11/indexing.py'
adding 'ImageD11/labelimage.py'
adding 'ImageD11/lattice_reduction.py'
adding 'ImageD11/license.py'
adding 'ImageD11/parameters.py'
adding 'ImageD11/peakmerge.py'
adding 'ImageD11/peaksearcher.py'
adding 'ImageD11/rc_array.py'
adding 'ImageD11/refinegrains.py'
adding 'ImageD11/rotdex.py'
adding 'ImageD11/rsv.py'
adding 'ImageD11/rsv_mapper.py'
adding 'ImageD11/saintraw.py'
adding 'ImageD11/scale.py'
adding 'ImageD11/simplex.py'
adding 'ImageD11/sparseframe.py'
adding 'ImageD11/sym_u.py'
adding 'ImageD11/symops.py'
adding 'ImageD11/threshold_image.py'
adding 'ImageD11/transform.py'
adding 'ImageD11/transformer.py'
adding 'ImageD11/unitcell.py'
adding 'ImageD11/write_graindex_gv.py'
adding 'ImageD11/silxGui/__init__.py'
adding 'ImageD11/silxGui/silx_colfile.py'
adding 'ImageD11/silxGui/silx_plot3d.py'
adding 'ImageD11/silxGui/silx_sptview.py'
adding 'ImageD11/tkGui/__init__.py'
adding 'ImageD11/tkGui/guiindexer.py'
adding 'ImageD11/tkGui/guimaker.py'
adding 'ImageD11/tkGui/guipeaksearch.py'
adding 'ImageD11/tkGui/guisolver.py'
adding 'ImageD11/tkGui/guitransformer.py'
adding 'ImageD11/tkGui/listdialog.py'
adding 'ImageD11/tkGui/plot3d.py'
adding 'ImageD11/tkGui/twodplot.py'
adding 'ImageD11-1.9.7.data/scripts/ImageD11_2_shelx.py'
adding 'ImageD11-1.9.7.data/scripts/ImageD11_gui.py'
adding 'ImageD11-1.9.7.data/scripts/avg_par.py'
adding 'ImageD11-1.9.7.data/scripts/bgmaker.py'
adding 'ImageD11-1.9.7.data/scripts/cutgrains.py'
adding 'ImageD11-1.9.7.data/scripts/edfheader.py'
adding 'ImageD11-1.9.7.data/scripts/filtergrain.py'
adding 'ImageD11-1.9.7.data/scripts/fit2dcake.py'
adding 'ImageD11-1.9.7.data/scripts/fitgrain.py'
adding 'ImageD11-1.9.7.data/scripts/fix_spline.py'
adding 'ImageD11-1.9.7.data/scripts/huber2bruker.py'
adding 'ImageD11-1.9.7.data/scripts/id11_summarize.py'
adding 'ImageD11-1.9.7.data/scripts/index_unknown.py'
adding 'ImageD11-1.9.7.data/scripts/makemap.py'
adding 'ImageD11-1.9.7.data/scripts/merge_flt.py'
adding 'ImageD11-1.9.7.data/scripts/pars_2_sweeper.py'
adding 'ImageD11-1.9.7.data/scripts/peaksearch.py'
adding 'ImageD11-1.9.7.data/scripts/plot3d.py'
adding 'ImageD11-1.9.7.data/scripts/plotImageD11map.py'
adding 'ImageD11-1.9.7.data/scripts/plotedf.py'
adding 'ImageD11-1.9.7.data/scripts/plotgrainhist.py'
adding 'ImageD11-1.9.7.data/scripts/plotlayer.py'
adding 'ImageD11-1.9.7.data/scripts/powderimagetopeaks.py'
adding 'ImageD11-1.9.7.data/scripts/refine_em.py'
adding 'ImageD11-1.9.7.data/scripts/rsv_mapper.py'
adding 'ImageD11-1.9.7.data/scripts/rubber.py'
adding 'ImageD11-1.9.7.data/scripts/spatialfix.py'
adding 'ImageD11-1.9.7.data/scripts/tomapper.py'
adding 'ImageD11-1.9.7.data/scripts/ubi2cellpars.py'
adding 'ImageD11-1.9.7.dist-info/LICENSE'
adding 'ImageD11-1.9.7.dist-info/METADATA'
adding 'ImageD11-1.9.7.dist-info/WHEEL'
adding 'ImageD11-1.9.7.dist-info/top_level.txt'
adding 'ImageD11-1.9.7.dist-info/RECORD'
removing build/bdist.linux-mips64/wheel
done
Stored in directory: /tmp/pip-ephem-wheel-cache-rbcr2r3b/wheels/1f/40/96/e2b99858642942d3db3ac113be696cb27933af066b812611fb
Removing source in /tmp/pip-req-build-l7tcmmwx
Successfully built ImageD11
Cleaning up...
Removed build tracker '/tmp/pip-req-tracker-7sulcc47'
but at beginning:
python3 -m pip -v install git+https://github.com/FABLE-3DXRD/ImageD11.git
Created temporary directory: /tmp/pip-ephem-wheel-cache-rbcr2r3b
Created temporary directory: /tmp/pip-req-tracker-7sulcc47
Created requirements tracker '/tmp/pip-req-tracker-7sulcc47'
Created temporary directory: /tmp/pip-install-06e7tgyq
Collecting git+https://github.com/FABLE-3DXRD/ImageD11.git
Created temporary directory: /tmp/pip-req-build-l7tcmmwx
Cloning https://github.com/FABLE-3DXRD/ImageD11.git to /tmp/pip-req-build-l7tcmmwx
Running command git clone -q https://github.com/FABLE-3DXRD/ImageD11.git /tmp/pip-req-build-l7tcmmwx
Added git+https://github.com/FABLE-3DXRD/ImageD11.git to build tracker '/tmp/pip-req-tracker-7sulcc47'
Running setup.py (path:/tmp/pip-req-build-l7tcmmwx/setup.py) egg_info for package from git+https://github.com/FABLE-3DXRD/ImageD11.git
Running command python setup.py egg_info
cc: error: unrecognized command line option ‘-mcpu=native’; did you mean ‘-march=native’?
Fast args are ['-mtune=native', '-march=native']
Building version |1.9.7|
Call create_cpu_check
Call bldlib
Seems to build OK
running egg_info
running build_src
build_src
building extension "cImageD11_safe" sources
creating build
creating build/src.linux-mips64-3.7
creating build/src.linux-mips64-3.7/src
f2py options: []
f2py: src/cImageD11_safe.pyf
Reading fortran codes...
Reading file 'src/cImageD11_safe.pyf' (format:free)
Line #96 in src/cImageD11_safe.pyf:" intent(c) "
All arguments will have attribute intent(c)
Line #117 in src/cImageD11_safe.pyf:" intent(c) "
All arguments will have attribute intent(c)
and for python setup.py build
, similar error at beginning:
python setup.py build
cc: error: unrecognized command line option ‘-mcpu=native’; did you mean ‘-march=native’?
('Fast args are', ['-mtune=native', '-march=native'])
Building version |1.9.7|
Call create_cpu_check
Call bldlib
Seems to build OK
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building extension "cImageD11_safe" sources
f2py options: []
f2py: src/cImageD11_safe.pyf
Reading fortran codes...
Reading file 'src/cImageD11_safe.pyf' (format:free)
Line #96 in src/cImageD11_safe.pyf:" intent(c) "
All arguments will have attribute intent(c)
last few lines of output:
build/src.linux-mips64-2.7/src/cImageD11_fastmodule.c:157:12: warning: ‘f2py_size’ defined but not used [-Wunused-function]
static int f2py_size(PyArrayObject* var, ...)
^~~~~~~~~
mips64el-linux-gnuabi64-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-LcFEUM/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-LcFEUM/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-mips64-2.7/build/src.linux-mips64-2.7/src/cImageD11_fastmodule.o build/temp.linux-mips64-2.7/build/src.linux-mips64-2.7/build/src.linux-mips64-2.7/src/fortranobject.o -L./src -lcImageD11_Linux_64bit_mips64_2.7_fast -o build/lib.linux-mips64-2.7/ImageD11/cImageD11_fast.so -O2 -fopenmp -fPIC -std=c99 -DF2PY_REPORT_ON_ARRAY_COPY=1.
running build_scripts
from imaged11.
Thanks for digging into this. I don't see what is wrong here? The "cc: error" at the beginning is the script figuring out that it cannot use -march=native and then it goes on to say "seems to build OK".
Can you check the output from this:
python -v -c 'import ImageD11.cImageD11' 2>&1 | grep ImageD11
Thanks!
from imaged11.
python -v -c 'import ImageD11.cImageD11' 2>&1 | grep ImageD11
import ImageD11 # directory /usr/local/lib/python2.7/dist-packages/ImageD11-1.9.0b0-py2.7-linux-mips64.egg/ImageD11
# /usr/local/lib/python2.7/dist-packages/ImageD11-1.9.0b0-py2.7-linux-mips64.egg/ImageD11/__init__.pyc matches /usr/local/lib/python2.7/dist-packages/ImageD11-1.9.0b0-py2.7-linux-mips64.egg/ImageD11/__init__.py
import ImageD11 # precompiled from /usr/local/lib/python2.7/dist-packages/ImageD11-1.9.0b0-py2.7-linux-mips64.egg/ImageD11/__init__.pyc
dlopen("/usr/local/lib/python2.7/dist-packages/ImageD11-1.9.0b0-py2.7-linux-mips64.egg/ImageD11/cImageD11.so", 2);
import ImageD11.cImageD11 # dynamically loaded from /usr/local/lib/python2.7/dist-packages/ImageD11-1.9.0b0-py2.7-linux-mips64.egg/ImageD11/cImageD11.so
# cleanup[1] ImageD11
# cleanup[1] ImageD11.cImageD11
looks like everything works great
from imaged11.
Looks like you are getting an old version 1.9.0 ? From git it should be 1.9.7. This would explain the tests failing. But if it works then perhaps it doesn't matter for now? Before uploading a new one it would be good to fix it. In principle you should be able to use python 3 (except for FitAllB). Something like a -U --no-deps
on the end of pip install might help.
from imaged11.
I installed 1.9.0 just before reporting. Now pip installed 1.9.7. When I type ImageD11_gui.py, 1.9.7 actually comes out. Something messed up here. Since it works it does not matter. Will try next time on a new machine. Many thanks again!
from imaged11.
I assume this is fixed - just needs a new release
from imaged11.
Related Issues (20)
- mlem output_size fails for even output size
- Concurrent Futures style multiprocessing context manager
- Sinogram class HOT 2
- Peakselect module HOT 2
- Make sandbox importable
- Grain recon class HOT 2
- mask argument for mlem is not used internally HOT 5
- Get rid of the shared memory arrays : add a colfile mmap option HOT 2
- sinograms.geometry module HOT 2
- Module based spatial distortions HOT 1
- GrainMap class HOT 3
- notebooks are not in the install HOT 1
- makemap.py introduces a rotation to grain positions in the lab frame for hexagonal systems HOT 1
- Left handed grains from index_unknown
- `ImageD11.columnfile.columnfile` fails to synchronize across `__setattr__` and `__getitem__` calls HOT 5
- Allow no mask to be used with lima_segmenter
- Default values with update_path() in dataset.py HOT 5
- PBP Code seems flipped in horizontal axis HOT 1
- get_ring_current_per_scan does not work for fscan2d data HOT 1
- Saving processing parameters & Nexus output, etc HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imaged11.