biocatiit / musclex

Muscle X program suite is a collection of programs intended to assist with analyzing diffraction X-ray images.
Other
5 stars 6 forks source link

Attempt to reinstall using pip on a Mac 10.13.3 OS failed #19

Closed SageMay closed 6 years ago

SageMay commented 6 years ago

Hi,

I had an old version of musclex installed on my mac using the Mac installer. To get an updated version, I uninstalled, and tried to reinstall using pip and am getting some errors that I don't know how to resolve with phonon. From the terminal I get:

==> qt@4 We agreed to the Qt opensource license for you. If this is unacceptable you should uninstall.

Phonon is not supported on macOS Sierra or with Xcode 8.

WebKit is no longer included for security reasons. If you absolutely need it, it can be installed with brew install qt-webkit@2.3. ==> qt-webkit@2.3 This is years old and really insecure. You shouldn't use it if you don't absolutely trust the HTML files you're using it to browse. Definely avoid using it in a general-purpose Web browser.

Also, video doesn't work. ==> sip The sip-dir for Python is /usr/local/share/sip. ==> pyqt@4 Phonon support is broken.


In addition, I discovered I had a dependency link that was broken that wasn't included in install directions -- I fixed that one with: pip install argparse


When I try running musclex after doing all install directions (except "brew install cartr/qt4/pyqt", which failed), I return the error: ImportError: No module named PyQt4.QtCore

I'd appreciate any advice for getting this running on Mac OS Sierra -- thank you!

XintianLee commented 6 years ago

Hi,

You can install PyQt4 or PyQt5 using Homebrew by running

brew install PyQt4

or

brew install PyQt5

Also, you can try installing PyQt5 using pip:

pip install pyqt5

Hope this helps.

XintianLee commented 6 years ago

Sorry, the program did have some problems itself since you were using python 2, which meant that you were only able to work with PyQt4 instead of PyQt5.

In the new release 1.13.7, this has been fixed and the program can work with both PyQt4 and PyQt5 under python 2.

SageMay commented 6 years ago

Hello!

Thank you for your response, and apologies for not getting back to this until now.

I was able to get musclex installed with your help, however I'm having issues when I try to run it. I tried running the equatorial function on an image I'd previously processed with musclex (so I knew it should work), and am returning pickle errors in the musclex error log. I'll copy that below. From what I'm seeing it may work better to run musclex on python 3, which is installed on my machine. Is there a way I can tell musclex to use python3 upon start up of the program (without changing other installed software's default choice of python2) ?

Thank you for your patience and support!

--Sage

File "/Users/sagemalingen/anaconda2/lib/python2.7/site-packages/musclex/CalibrationSettings/CalibrationSettings.py", line 345, in loadSettings cache = pickle.load(open(cache_file, "rb")) File "/Users/sagemalingen/anaconda2/lib/python2.7/pickle.py", line 1384, in load return Unpickler(file).load() File "/Users/sagemalingen/anaconda2/lib/python2.7/pickle.py", line 864, in load dispatchkey File "/Users/sagemalingen/anaconda2/lib/python2.7/pickle.py", line 892, in load_proto raise ValueError, "unsupported pickle protocol: %d" % proto ValueError: unsupported pickle protocol: 3

Similarly, for the quadrant folding function it ran up until throwing errors when selecting an image file to process. This output was from the terminal, but the error log continues to cite unsupported pickle protocol: 3.

objc[12854]: Class QNSMenu is implemented in both /Users/sagemalingen/anaconda2/plugins/platforms/libqcocoa.dylib (0x110743970) and /Users/sagemalingen/anaconda2/lib/python2.7/site-packages/cv2/.dylibs/QtGui (0x11a38e378). One of the two will be used. Which one is undefined. No handlers could be found for logger "pyFAI.opencl.common" objc[12854]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fff96014b68) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x121a60cd8). One of the two will be used. Which one is undefined.

On Thu, Jul 19, 2018 at 11:03 PM, Xintian notifications@github.com wrote:

Sorry, the program did have some problems itself since you were using python 2, which meant that you were only able to work with PyQt4 instead of PyQt5.

In the new release 1.13.7, this has been fixed and the program can work with both PyQt4 and PyQt5 under python 2.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/biocatiit/musclex/issues/19#issuecomment-406497929, or mute the thread https://github.com/notifications/unsubscribe-auth/AXdHyP50w0V2Tw5DdZDypO7R0YOGawz0ks5uIXLAgaJpZM4VTXMk .

XintianLee commented 6 years ago

You are right. The cache files created by pickle in python 3 cannot be read by pickle in python 2. A simple way to solve this problem is just deleting all the cache files (.info files in the directory eq_cache).

If you want to run musclex under python 3, you must install it with python 3. You can run

pip3 install musclex

or

python3 -m pip install musclex

if python 3 have been already installed on your computer.

SageMay commented 6 years ago

Hello Xintian,

I tried reinstalling with python3 -- the first prompt didn't work, the second appeared to until I tried to run a function and got the error at the end of this email -- perhaps this is easily avoided with a better knowledge of bash. Looks like it's still referencing python 2.

Then i uninstalled that version and reinstalled without specifying (so it should be installed with python2). I tried opening an image from a folder that hadn't been processed at all, so no pickled cache files. The software shows the image as if the beam wasn't on for multiple images (I doubt the file is actually blank). The error log reports:

File "/Users/sagemalingen/anaconda2/lib/python2.7/site-packages/musclex/ui/QuadrantFoldingGUI.py", line 2017, in nextClicked self.onImageChanged() File "/Users/sagemalingen/anaconda2/lib/python2.7/site-packages/musclex/ui/QuadrantFoldingGUI.py", line 1625, in onImageChanged self.processImage() File "/Users/sagemalingen/anaconda2/lib/python2.7/site-packages/musclex/ui/QuadrantFoldingGUI.py", line 1810, in processImage self.saveBackground() File "/Users/sagemalingen/anaconda2/lib/python2.7/site-packages/musclex/ui/QuadrantFoldingGUI.py", line 1843, in saveBackground self.csv_bg = self.csv_bg.drop(index=filename) TypeError: drop() got an unexpected keyword argument 'index'

For an image that I had previously processed I return the pickle error as before, even after deleting all of the cache folders (.info files) -- with the previous version of musclex I was able to work with this file on this computer despite running on a python2 base. I'm pretty confused!

Again, thank you for your patience in dealing with my barrage of issues -- your help is hugely appreciated!

-- Sage


Error with python 3 install:

D-10-19-172-211:~ sagemalingen1$ musclex qf Traceback (most recent call last): File "/Users/sagemalingen/anaconda2/bin/musclex", line 6, in from pkg_resources import load_entry_point File "/Users/sagemalingen/anaconda2/lib/python2.7/site-packages/pkg_resources/init.py", line 3095, in @_call_aside File "/Users/sagemalingen/anaconda2/lib/python2.7/site-packages/pkg_resources/init.py", line 3079, in _call_aside f(*args, **kwargs) File "/Users/sagemalingen/anaconda2/lib/python2.7/site-packages/pkg_resources/init.py", line 3108, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/Users/sagemalingen/anaconda2/lib/python2.7/site-packages/pkg_resources/init.py", line 570, in _build_master ws.require(requires) File "/Users/sagemalingen/anaconda2/lib/python2.7/site-packages/pkg_resources/init.py", line 888, in require needed = self.resolve(parse_requirements(requirements)) File "/Users/sagemalingen/anaconda2/lib/python2.7/site-packages/pkg_resources/init.py", line 774, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'musclex==1.13.8' distribution was not found and is required by the application D-10-19-172-211:~ sagemalingen1$

On Tue, Jul 24, 2018 at 7:40 PM, Xintian notifications@github.com wrote:

You are right. The cache files created by pickle in python 3 cannot be read by pickle in python 2. A simple way to solve this problem is just deleting all the cache files (.info files in the directory eq_cache).

If you want to run musclex under python 3, you must install it with python

  1. You can run

pip3 install musclex

or

python3 -m pip install musclex

if python 3 have been already installed on your computer.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/biocatiit/musclex/issues/19#issuecomment-407614905, or mute the thread https://github.com/notifications/unsubscribe-auth/AXdHyMu23iTnBQ_AeZwskivZOsq8FW4oks5uJ9qGgaJpZM4VTXMk .

XintianLee commented 6 years ago

Hi,

This error occurred because you were using an old version of pandas. You can check it by running

pip show pandas

to see its version, and then upgrade it by running

pip install -U pandas

Actually, you can directly run

pip install -U musclex

to upgrade all the dependencies needed by musclex including pandas.

For the images which the beam seems not on, you can try turning down the value of max intensity in some spinbox. In this way, pixels of low intensity will show.

As for images still gave pickle errors, you can try again after upgrading all the dependencies.

Thanks, Xintian

SageMay commented 6 years ago

Good morning Xintian,

I'm so thrilled! After updating pandas, it runs!!! Thank you so much -- I'm excited to get going on this data :)

As an FYI, I had to directly update pandas -- the prompt to upgrade all dependencies returned this for pandas, along with a similar error for other dependencies. I have no idea what's helpful for you on the software side, so thought I'd pass it along:

"Requirement not upgraded as not directly required: pandas in ./anaconda2/lib/python2.7/site-packages (from musclex) (0.20.3)"

All the best,

--Sage

On Thu, Jul 26, 2018 at 1:02 AM, Xintian notifications@github.com wrote:

Hi,

This error occurred because you were using an old version of pandas. You can check it by running

pip show pandas

to see its version, and then upgrade it by running

pip install -U pandas

Actually, you can directly run

pip install -U musclex

to upgrade all the dependencies needed by musclex including pandas.

For the images which the beam seems not on, you can try turning down the value of max intensity in some spinbox. In this way, pixels of low intensity will show.

As for images still gave pickle errors, you can try again after upgrading all the dependencies.

Thanks, Xintian

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/biocatiit/musclex/issues/19#issuecomment-408012144, or mute the thread https://github.com/notifications/unsubscribe-auth/AXdHyGRXU-LGgf9nCZU1iXoWWpoRnk9Cks5uKXehgaJpZM4VTXMk .