issues with fabian on windows #37
Replies: 8 comments
-
You can normally install latest versions from git using pip like this:
I will create an issue over in the fabian repository to remind us to upload something to pypi - I think the problem is coming up with a name because fabian is already taken... |
Beta Was this translation helpful? Give feedback.
-
To add to John's comment, we did update the median.py (and other calls to deprecated time functions) since your last visit in Lille. The fabian version on github should be up-to-date. We should document the pip installation procedure in the README. Could you let people know if the code suggested by John is actually working? |
Beta Was this translation helpful? Give feedback.
-
Hi all, thank you for these responses. I was able to install git for
windows and run the pip install code that Jon provided. However, I am still
getting this error when I run:
median.py -i C189_BL1_P1_q1_s2_241.edf -o C189_BL1_P1_q1_s2_median -f 1
-l 120
C:\Users\zurkowski1\AppData\Local\anaconda3\Scripts\median.py:4:
*DeprecationWarning:
pkg_resources is deprecated as an API. See
https://setuptools.pypa.io/en/latest/pkg_resources.html
<https://setuptools.pypa.io/en/latest/pkg_resources.html>*
* __import__('pkg_resources').run_script('fabian==0.7.0', 'median.py')*
No file name supplied [-i filename]
The number of the first image is missing [-f filenumber]
The length of the file seris is missing [-l filelength]
Usage: median.py [options]
Options:
-h, --help show this help message and exit
-i FILENAME, --filename=FILENAME
Name of an image file
-o MEDIAN_FILESTEM, --output=MEDIAN_FILESTEM
Stem of median file
-f FIRST, --first=FIRST
first file in file series
-l FILTERLENGTH, --length=FILTERLENGTH
length of file series
-s DELTA, --step=DELTA
step in between number of files to be used
-S SLIDE, --slide=SLIDE
no of median images
-d, --debug Run in debug mode
Again, I apologize if I am missing something here. I appreciate your help.
…On Wed, Dec 20, 2023 at 3:10 AM Sébastien Merkel ***@***.***> wrote:
To add to John's comment, we did update the median.py (and other calls to
deprecated time functions) since your last visit in Lille. The fabian
version on github should be up-to-date.
We should document the pip installation procedure in the README. Could you
let people know if the code suggested by John is actually working?
—
Reply to this email directly, view it on GitHub
<#37 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVKVG5MSGSUX7YSJAESOJADYKLBTTAVCNFSM6AAAAABA3TOO7GVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TSMBXGEYDE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
~Claire Zurkowski~
https://clairezurkowski.github.io/go/
|
Beta Was this translation helpful? Give feedback.
-
(This is a guess). If the first filename in your sequence is: I don't see the error about pkg_resources - if that is eating sys.argv then you can also try:
Note that you have the same functionality in pyFAI-average, that is somewhat better maintained these days (min, median): https://pyfai.readthedocs.io/en/master/man/pyFAI-average.html |
Beta Was this translation helpful? Give feedback.
-
Thanks so much! I did try this yesterday and got the same error, but let me
try again now and let you know.
~Claire Zurkowski~
https://clairezurkowski.github.io/go/
…On Wed, Dec 20, 2023 at 9:04 AM Jon Wright ***@***.***> wrote:
(This is a guess). If the first filename in your sequence is:
C189_BL1_P1_q1_s2_241.edf then it is expecting -f 241 in order to start
from frame number 241 and the -l 120 means it will look for:
C189_BL1_P1_q1_s2_241.edf
C189_BL1_P1_q1_s2_242.edf
C189_BL1_P1_q1_s2_243.edf
...
C189_BL1_P1_q1_s2_361.edf
I don't see the error about pkg_resources - if that is eating sys.argv
then you can also try:
python C:\Users\zurkowski1\AppData\Local\anaconda3\Scripts\median.py -i
C189_BL1_P1_q1_s2_241.edf -f 241 -l 10 -o median -d
Note that you have the same functionality in pyFAI-average, that is
somewhat better maintained these days (min, median):
https://pyfai.readthedocs.io/en/master/man/pyFAI-average.html
—
Reply to this email directly, view it on GitHub
<#37 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVKVG5OJYLYTNKHMOWAIQ63YKMLCVAVCNFSM6AAAAABA3TOO7GVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TSMJQGUZDQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
okay, so I tried this one: python C:\Users\zurkowski1\AppData\
Local\anaconda3\Scripts\median.py -i C189_BL1_P1_q1_s2_241.edf -f 241 -l 10
-o median -d
and got a bit further this time. I received the error code:
C:\Users\zurkowski1\AppData\Local\anaconda3\Scripts\median.py:4:
DeprecationWarning: pkg_resources is deprecated as an API. See
https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__('pkg_resources').run_script('fabian==0.7.0', 'median.py')
Traceback (most recent call last):
File "C:\Users\zurkowski1\AppData\Local\anaconda3\Scripts\median.py",
line 4, in <module>
__import__('pkg_resources').run_script('fabian==0.7.0', 'median.py')
File
"C:\Users\zurkowski1\AppData\Local\anaconda3\Lib\site-packages\pkg_resources\__init__.py",
line 722, in run_script
self.require(requires)[0].run_script(script_name, ns)
File
"C:\Users\zurkowski1\AppData\Local\anaconda3\Lib\site-packages\pkg_resources\__init__.py",
line 1572, in run_script
exec(script_code, namespace, namespace)
File
"C:\Users\zurkowski1\AppData\Local\anaconda3\Lib\site-packages\fabian-0.7.0-py3.11.egg\EGG-INFO\scripts\median.py",
line 88, in <module>
File
"C:\Users\zurkowski1\AppData\Local\anaconda3\Lib\site-packages\fabian-0.7.0-py3.11.egg\EGG-INFO\scripts\median.py",
line 62, in start
AttributeError: module 'time' has no attribute 'clock'
when I was visiting Lille, Sébastien helped me to go into these folders and
modify median.py
/fabian-master/scripts
- Open median.py and replace *time.clock* with *time.process_time* in
all places
/fabian-master/Fabian
- Replace *self.median=N.zeros((d2,d1)).astype(n.float) *with*
self.median=N.zeros((d2,d1)).astype(float)*
Is this something I need to do again?
This time I installed fabian with the pip, but I can go into the
\Scripts\median.py and adjust the script if needed.
Thank you!
On Wed, Dec 20, 2023 at 9:05 AM Claire Zurkowski ***@***.***>
wrote:
… Thanks so much! I did try this yesterday and got the same error, but let
me try again now and let you know.
~Claire Zurkowski~
https://clairezurkowski.github.io/go/
On Wed, Dec 20, 2023 at 9:04 AM Jon Wright ***@***.***>
wrote:
> (This is a guess). If the first filename in your sequence is:
> C189_BL1_P1_q1_s2_241.edf then it is expecting -f 241 in order to start
> from frame number 241 and the -l 120 means it will look for:
> C189_BL1_P1_q1_s2_241.edf
> C189_BL1_P1_q1_s2_242.edf
> C189_BL1_P1_q1_s2_243.edf
> ...
> C189_BL1_P1_q1_s2_361.edf
>
> I don't see the error about pkg_resources - if that is eating sys.argv
> then you can also try:
>
> python C:\Users\zurkowski1\AppData\Local\anaconda3\Scripts\median.py -i
> C189_BL1_P1_q1_s2_241.edf -f 241 -l 10 -o median -d
>
> Note that you have the same functionality in pyFAI-average, that is
> somewhat better maintained these days (min, median):
> https://pyfai.readthedocs.io/en/master/man/pyFAI-average.html
>
> —
> Reply to this email directly, view it on GitHub
> <#37 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AVKVG5OJYLYTNKHMOWAIQ63YKMLCVAVCNFSM6AAAAABA3TOO7GVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TSMJQGUZDQ>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
--
~Claire Zurkowski~
https://clairezurkowski.github.io/go/
|
Beta Was this translation helpful? Give feedback.
-
Where it says: To understand what went wrong: when you did the |
Beta Was this translation helpful? Give feedback.
-
Okay, I got things working. I went into \anaconda3\lib\site-packages then
deleted the fabian-0.7.0-py3.11.egg file. Then, reinstalled fabian by going
into my fabian-master folder and doing the build and install commands. I
had already had the median.py files updated in this folder.
After rerunning the median.py [options] command, I now have a median file
for my data.
Thank you for your help!
…On Wed, Dec 20, 2023 at 9:40 AM Jon Wright ***@***.***> wrote:
Where it says:
AttributeError: module 'time' has no attribute 'clock'
... then it seems you lost your changes? If you can change the clock to a
time then it might run.
To understand what went wrong: when you did the pip install, maybe there
is another pip installing for another python somewhere on your computer (where
pip and where python to check on that). You can also use python -m pip to
call on the pip matching your python.
—
Reply to this email directly, view it on GitHub
<#37 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVKVG5OUZE4BCAN6MSIGGTDYKMPJNAVCNFSM6AAAAABA3TOO7GVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TSMJQHAYDS>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
~Claire Zurkowski~
https://clairezurkowski.github.io/go/
|
Beta Was this translation helpful? Give feedback.
-
Hello! I am getting my mXRD tools setup on my PC and was able to install Fabian and open the gui, however, I noticed this warning message when I installed it initially:
DEPRECATION: Loading egg at c:\users\zurkowski1\appdata\local\anaconda3\lib\site-packages\fabian-0.7.0-py3.11.egg is deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use pip for package installation..
Then, I had to go in and adjust the median.py file and am now trying to build and install fabian again. I am receiving this error:
error: [WinError 32] The process cannot access the file because it is being used by another process: 'c:\users\zurkowski1\appdata\local\anaconda3\lib\site-packages\fabian-0.7.0-py3.11.egg'
I installed fabian form the fabian-master folder downloaded from github. Is there by chance a pip install option that already has the updated median.py file?
This egg file issue probably highlights my naivety with python, but as I am trying to google and figure it out, I figured I would post the discussion here in case anyone has experience with this. Thank you, Claire
Beta Was this translation helpful? Give feedback.
All reactions