lmdu / krait

An ultrafast tool for genome-wide survey of microsatellites and primer design
http://krait.biosv.com
GNU Affero General Public License v3.0
38 stars 9 forks source link

MacOS Security issues #10

Closed DeondeJager closed 4 years ago

DeondeJager commented 4 years ago

Dear Lianming,

I downloaded the "Krait-v1.1.0-mac.tar.gz", unzipped and tried running Krait on a Macbook Pro OS = Catalina10.15.4. Unfortunately, I keep getting security pop-ups saying that the software could not be opened because the developer cannot be verified. An example:

“libopenblasp-r0.3.7.dylib” cannot be opened because the developer cannot be verified.

It first does this for "Krait" and then a similar warning pops up from Python and then it starts going through each "module" in the folder, giving a warning for each one. I can allow each particular module to run by giving it permission with my password, but then it just pops up with another warning for the next module - and there are many, many modules, which makes it very inconvenient.

Do you have any ideas for getting around this?

Perhaps if one could compile it from source, then these warnings wouldn't pop up, but I don't see any instructions for compiling from source in the manual/readme and I'm not sure how to do it. The Mac is running python2.7. Is that fine, or does it need python3?

Cheers Deon

DeondeJager commented 4 years ago

OK, so a colleague of mine helped me out with the security issue on MacOS. Running the following command solves it:

sudo spctl --master-disable

Then I'm able to launch Krait without any security warnings, but the following errors are shown in the terminal and Krait fails to open:

"The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh. For more details, please visit https://support.apple.com/kb/HT208050. Andis-MacBook-Pro:~ andi$ /Users/andi/Downloads/Krait/Krait ; exit; Traceback (most recent call last): File "main.py", line 64, in File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "/usr/local/lib/python3.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 623, in exec_module File "workers.py", line 14, in File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "/usr/local/lib/python3.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 623, in exec_module File "primer3/init.py", line 40, in File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "/usr/local/lib/python3.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 623, in exec_module File "primer3/bindings.py", line 40, in File "primer3/thermoanalysis.pyx", line 108, in init primer3.thermoanalysis File "primer3/thermoanalysis.pyx", line 106, in primer3.thermoanalysis._loadThermoParams OSError: Could not load thermodynamic config file /Users/andi/primer3_config/ [12609] Failed to execute script main logout Saving session... ...copying shared history... ...saving history...truncating history files... ...completed.

[Process completed]"

If anyone has any suggestions, please let me know.

DeondeJager commented 4 years ago

So I thought it might be the version of python that's the issue, as the default python on this Mac was v2.7.16. Version 3.7.3 is installed, however, so I changed the "python" alias in the shell to point to v3.7.3 by adding the following lines to the ~/.zshrc file (I changed the default terminal from bash to zsh - unrelated to current problem):

alias python2=/usr/bin/python2.7 and alias python=/usr/bin/python3

However, I still get the same errors when trying to launch Krait. I realised that these commands only change the version of python within the shell terminal and not necessarily system-wide. So if I type /usr/bin/python --version, the outcome is Python 2.7.16. I tried to change this using a symbolic link as suggested here, but it says Operation not permitted, even if use sudo. Also, I'm not too keen to change the command python system-wide, as it could cause other apps to break that expect python to point to python 2.7.

So yeah, that's where I'm at. Still can't use Krait on MacOS.

lmdu commented 4 years ago

We have released a new version 1.2.1. I have run it on MacOS 10.13.6. It woks well. If this version still do not work for you. You can install python and required packages to run Krait with source code. We have added the tutorial to the newest documentation.

DeondeJager commented 4 years ago

I just tested this version (1.2.1) on Macbook Pro OS = Catalina10.15.4 and it worked well! No issues to report on. Thank you!

This looks like a substantial update in terms of multi-platform usability and stability! Thanks for your effort and for making and maintaining this tool! It is, in my opinion, an excellent program and by far the most user-friendly of any microsat search tool.