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

Installation on Apple Silicon (M1/M2) #113

Closed
ZryletTC opened this issue Jun 6, 2024 · 9 comments
Closed

Installation on Apple Silicon (M1/M2) #113

ZryletTC opened this issue Jun 6, 2024 · 9 comments

Comments

@ZryletTC
Copy link

ZryletTC commented Jun 6, 2024

Sorry if this is something that you're already aware of/have addressed but I had issues following the installation guidelines today due to being on an Apple Silicon machine and couldn't find anything about it being previously reported.

Instead of the instructions listed on your website:

conda create --name=pdfgui2 python=3.9
conda activate pdfgui2
conda install -c conda-forge diffpy.pdfgui

I had to run CONDA_SUBDIR=osx-64 conda create -n pdfgui2 python=3.9 diffpy.pdfgui -c conda-forge

I was hoping a note could be added to the website for future users with Apple Silicon chips, or better yet, the package could be built for osx-arm64.

@Joweke
Copy link

Joweke commented Jul 4, 2024

This was a lifesaver for me – tried multiple ways always getting an error on the install line until a colleague pointed me to this. Thank you!

@Joweke
Copy link

Joweke commented Jul 4, 2024

spoke too soon. when i got into the program, trying to run a fit, plot a fit, or even trying to copy a result value returned this:

Traceback (most recent call last): File "/opt/anaconda3/envs/pdfgui2/lib/python3.9/site-packages/diffpy/pdfgui/gui/errorwrapper.py", line 62, in _f return func(*args, **kwargs) File "/opt/anaconda3/envs/pdfgui2/lib/python3.9/site-packages/diffpy/pdfgui/gui/mainframe.py", line 1636, in disableMainMenuItems if not cdata.Gcalc: File "/opt/anaconda3/envs/pdfgui2/lib/python3.9/site-packages/diffpy/pdfgui/control/fitdataset.py", line 666, in _get_Gcalc self._updateRcalcSampling() File "/opt/anaconda3/envs/pdfgui2/lib/python3.9/site-packages/diffpy/pdfgui/control/fitdataset.py", line 595, in _updateRcalcSampling newGcalc = grid_interpolation(self._rcalc, self._Gcalc, newrcalc) File "/opt/anaconda3/envs/pdfgui2/lib/python3.9/site-packages/diffpy/pdfgui/control/fitdataset.py", line 772, in grid_interpolation x0 = numpy.array(x0, copy=False, dtype=float) ValueError: Unable to avoid copy while creating an array as requested. If using np.array(obj, copy=False)replace it withnp.asarray(obj)to allow a copy when needed (no behavior change in NumPy 1.x). For more details, see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword.

@bobleesj
Copy link
Contributor

@sbillinge Please also include this to the 3.1.0 milestone!

@sbillinge sbillinge added this to the v3.1.0 milestone Oct 1, 2024
@sbillinge
Copy link
Contributor

This should be fixed with the latest release. Move to full release and ask the OPs to test on the pre-release

@sbillinge
Copy link
Contributor

@ZryletTC please could you see if this bug is fixed in the latest version of the code? We have a pre-release version that we are testing.

To install it, please use these instructions:

Installation instructions (Windows, Linux, macOS non-arm64):

conda create -n pdfgui313rc python=3.13
conda activate pdfgui313rc
conda install wxpython diffpy.utils diffpy.pdffit2 matplotlib-base pycifrw
pip install diffpy.pdfgui==3.1.0rc8 --no-deps

Instructions for Mac-OS arm64:

conda create -n pdfgui313rc python=3.13
conda activate pdfgui313rc
conda install wxpython diffpy.utils matplotlib-base pycifrw
pip install diffpy.pdffit2
pip install diffpy.pdfgui==3.1.0rc8 --no-deps

Thanks so much!

@ZryletTC
Copy link
Author

Sorry, been a bit busy but I'll try it out this weekend!

@sbillinge
Copy link
Contributor

Thanks so much.

@ZryletTC
Copy link
Author

Looks good to me!

It installed and ran fine. Went through Lesson 1 of the tutorial without any issues.

@sbillinge
Copy link
Contributor

Thanks so much! Closing as fixed.

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

No branches or pull requests

4 participants