Closed dragonyanglong closed 1 month ago
BTW, I suspect the error is due to python version. From the web instruction, python 3.11 seems to be working. Then I tried to create a new environment as follows, but still no luck.
conda create -n GSASIItest
conda activate GSASIItest
conda install python=3.11 briantoby::gsas2pkg
It gave the error
(GSASII) longyang@Longs-MacBook-Pro GSASII % conda install python=3.11 briantoby::gsas2pkg
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions
Package python conflicts for:
briantoby::gsas2pkg -> conda -> python[version='2.6.*|2.7.*|3.4.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.10,<3.11.0a0|>=3.11,<3.12.0a0|>=3.12,<3.13.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0|>=3.4,<3.5.0a0|3.3.*|>=3.5|>=3.4|>=3|>=3.6']
briantoby::gsas2pkg -> python[version='3.11.*|>=3.7']
python=3.11
conda create -n GSASII briantoby::gsas2pkg -c conda-forge conda activate GSASII
This should force an installation of python 3.11, but clearly Python 3.12 was installed. I don't know why. Someday 3.12 should also work, but for now we are not able to build binaries for anything newer than 3.11. You are welcome to play around with the new build process that is currently a pull request, but I am going to put that off myself for a while.
- I tried typing
gsasII.sh
, but showedzsh: command not found: gsasII.sh
.
This would require a full path to the gsasII.sh file.
- I tried typing
pythonw /Users/longyang/opt/anaconda3/envs/GSASII/GSASII/GSASII.py
, but gave the following errorPython/module versions loaded: Python: 3.12.5 from /Users/longyang/opt/anaconda3/envs/GSASII/bin/python. New untested version; please keep us posted
You should not need pythonw for GSAS-II anymore, but it should not hurt.
I list my conda environment below
(GSASII) longyang@Longs-MacBook-Pro GSASII % conda list # packages in environment at /Users/longyang/opt/anaconda3/envs/GSASII: # # Name Version Build Channel numpy 2.1.1 py312he4d506f_0 conda-forge python 3.12.5 h37a9e06_0_cpython conda-forge
The binaries we supply require Python 3.11. and numpy 1.26.
BTW, I suspect the error is due to python version.
I think you may well be correct.
> conda create -n GSASIItest
> conda activate GSASIItest
> conda install python=3.11 briantoby::gsas2pkg
>
>
> It gave the error
>
>
> (GSASII) longyang@Longs-MacBook-Pro GSASII % conda install python=3.11 briantoby::gsas2pkg
...
> UnsatisfiableError: The following specifications were found to be incompatible with each other:
>
> Output in format: Requested package -> Available versions
>
> Package python conflicts for:
> briantoby::gsas2pkg -> conda -> python[version='2.6.*|2.7.*|3.4.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.10,<3.11.0a0|>=3.11,<3.12.0a0|>=3.12,<3.13.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0|>=3.4,<3.5.0a0|3.3.*|>=3.5|>=3.4|>=3|>=3.6']
> briantoby::gsas2pkg -> python[version='3.11.*|>=3.7']
> python=3.11
I have to be honest that while I don't understand this error message, as it seems to imply that Python 3.11 would satisfy the requirements, I have a guess as to what the problem you are having here. I think you have installed anaconda's conda while I have been using the conda-forge version for all my recent work. The two should be compatible, but it may well be that without the -c conda-forge on the command line, only the anaconda locations are searched and it may not find the packages that GSAS-II needs.
I will need to try some testing to see if anaconda's miniconda will work as well as the miniforge from conda-forge. Until I do, I recommend using this command for the install:
conda create -n GSASIItest python=3.11 numpy=1.26 briantoby::gsas2pkg -c conda-forge
conda activate GSASIItest
You will need to remove the old GSASIItest with this command: conda env remove -n GSASIItest
before running the new test. Please make note of the conda output when this runs as it will tell you where each package is downloaded from. That may well matter.
run GSAS-II with
python ~/opt/anaconda3/envs/GSASIItest/GSASII/GSASII.py
As a follow-up, I tried downloading the Anaconda Miniconda installer (rather than miniforge or mambaforge which I normally use). It worked fine too. After the install, I used the commands in the instructions (same as you list above):
conda create -n GSASII briantoby::gsas2pkg -c conda-forge
conda activate GSASII
After those commands, the intended versions of Python (3.11.10) & numpy (1.26.4) were downloaded, not the ones you have listed above. After doing the activate command, the gsasII.sh was found in the path and a finder window was opened showing the GSAS-II Mac application:
I can see that somehow you obtained newer Python and numpy versions than required by the meta.yaml for the package. I'm really at a loss for how that happened, unless somehow local conda settings are somehow overriding my package's settings.
I'd be happy to meet with you over zoom/teams to see more on what you are doing.
Dear @briantoby , Thanks for your detailed reply.
I am using anaconda's conda. I tried again
conda create -n GSASII briantoby::gsas2pkg -c conda-forge
conda activate GSASII
but still no luck. It still installed python 3.12.
I tried
conda create -n GSASIItest python=3.11 numpy=1.26 briantoby::gsas2pkg -c conda-forge
conda activate GSASIItest
python ~/opt/anaconda3/envs/GSASIItest/GSASII/GSASII.py
It seems to work. Though the binary file seems like not installed. It pop out a window to ask download the binary file from github releases. After click download
, the GSASII window appears.
A quick zoom meeting would be appreciated to go through what is going on here. What is your email? We can discuss the time to meet over the email.
Hmmm, I don't understand this, but conda is pretty complex. What happens if you install a fresh copy of miniconda, say in /tmp/ and activate that? Perhaps then the
conda create -n GSASII briantoby::gsas2pkg -c conda-forge
command will work.
e-mail: toby at anl dot gov
Thanks. Email sent.
The problem here seems to be that unless the version of gsas2pkg was specified, an older version would be used. Conda would rather use an older gsas2pkg with the latest Python than the newest gsas2pkg and downdate Python. The older gsas2pkg did not actually work with Py>3.11 so the older gsas2pkg files should not have allowed that. In any case, I don't want anyone to use the older gsas2pkg versions, as they require the subversion server or were test versions.
Removed all but the current gsas2pkg from the briantoby channel on conda-forge. That seems to fix this.
Dear @briantoby , I was following the instructions on https://advancedphotonsource.github.io/GSAS-II-tutorials/install.html#gsas2pkg-conda-package, but failed. Thanks for your help.
After installing
I tried typing
gsasII.sh
, but showedzsh: command not found: gsasII.sh
.I tried typing
pythonw /Users/longyang/opt/anaconda3/envs/GSASII/GSASII/GSASII.py
, but gave the following errorAnd pop up a error window
I list my conda environment below