win11 wsl2 裝 pymol
果然又遇到了一堆問題。。搞了兩天。。好不容易把pymol裝好了結(jié)果手賤把rosetta的build文件給rm了。。。。。。。。。。然后又重新編譯又遇到了奇怪的問題于是把wsl給重啟了。。結(jié)果好不容易設(shè)置好的pymol又寄了。。。??偹愀愫昧?,記錄一下萬一又寄了有地方找。。
參考:
https://github.com/schrodinger/pymol-open-source/blob/master/INSTALL
https://zhuanlan.zhihu.com/p/88113746
裝庫:
?sudo?apt?install?python-pmw?libglew-dev?freeglut3-dev?libpng-dev?libfreetype6-dev?libxml2-dev?libmsgpack-dev libglm-dev?mesa-utils x11-apps?libxcb-xinerama0?libxcb-icccm4?libnetcdf-dev
git clone https://github.com/rcsb/mmtf-cpp.git
不要錢的源碼:
git clone https://github.com/schrodinger/pymol-open-source.git
cp?mmtf-cpp/include/mmtf* pymol-open-source/include/?
把一個(gè)mmtf庫里的頭文件移到pymol文件夾里
sudo?python?setup.py?build?install?--glut
正常情況下在 /pymol-open-source?輸入pymol即有pymol窗口彈出
sudo?vim?~/.bashrc
添加一行?export?PATH=$PATH:“/usr/local/bin“?任何目錄輸入pymol都可打開
一定要加--glut不然后面報(bào)錯(cuò):
NotImplementedError: compile with --glut
出現(xiàn)這個(gè)報(bào)錯(cuò)就把 build 文件夾刪了重新 setup
(沒刪build的話直接重編譯幾次都沒啥用。。又忘了哪看來的解決辦法了
如果報(bào)錯(cuò):
qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, minimal, minimalegl, offscreen, vnc, webgl, xcb. Aborted
就使用 pyside2 代替 pyqt5:
pip?install?PySide2 即可
(又是來自于角落的解決方法。。https://discourse.flathub.org/t/need-help-build-pymol-cannot-run-pymol-qt-not-available/1146 )
如果報(bào)錯(cuò):
Error:?unable?to?open?display?:0
似乎好像是 openGL的問題,查了整個(gè)晚上什么改值為0一點(diǎn)用也沒。。一大堆論壇里的辦法根本沒啥用。。又是在互聯(lián)網(wǎng)的某個(gè)小角落里找到了解決方法。。話說還真是簡單粗暴。。
管理員權(quán)限打開powershell,更新wsl并重啟:
wsl?--update
wsl?--shutdown
wsl 重啟后要改DNS
測試:xeyes glxgears 出現(xiàn)眼睛和齒輪說明可以使用
可以更換默認(rèn)python版本
sudo?update-alternatives?--config?python3
可以根據(jù)不同python版本編譯不同版本。。