医学图像识别——图像转换mrc-to-png

conda 源配置

安装教程

放置位置:
(base) muyun@muyun:~/Downloads$ ls -l
total 545384
drwxr-xr-x  4 muyun muyun      4096 10月 31  2023 cudnn-linux-x86_64-8.9.6.50_cuda11-archive
-rw-rw-r--  1 muyun muyun 126311570 6月  30 14:20 eman2.91_sphire1.4_sparx.linux64.sh
-rw-rw-r--  1 muyun muyun 102181140 6月  30 13:53 eman2.99.47_sphire1.4_sparx.linux64.sh
-rw-rw-r--  1 muyun muyun 143808873 6月  26 23:12 Miniconda3-latest-Linux-x86_64.sh
drwxrwxr-x 11 muyun muyun      4096 10月 11  2020 opencv-3.4.12
-rwxrwxrwx  1 muyun muyun  91879597 6月   2 02:13 opencv-3.4.12.zip
-rw-rw-r--  1 muyun muyun  92467882 5月  27 23:06 opencv-4.5.1.zip
drwxr-xr-x 11 muyun muyun      4096 4月  27  2023 TensorRT-8.6.1.6
drwxrwxr-x 51 muyun muyun      4096 5月  15 10:13 tensorrtx-master
-rw-rw-r--  1 muyun muyun   1779942 6月  13 21:18 tensorrtx-master.zip
开始安装
(base) muyun@muyun:~/Downloads$ bash eman2.91_sphire1.4_sparx.linux64.sh 

Welcome to EMAN2-SPHIRE-SPARX combined

EMAN2-SPHIRE-SPARX will now be installed into this location:
/home/muyun/eman2-sphire-sparx

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/home/muyun/eman2-sphire-sparx] >>> 
PREFIX=/home/muyun/eman2-sphire-sparx
Unpacking payload ...
Collecting package metadata (current_repodata.json): done                                                                               
Solving environment: done
安装完毕 conda初始化
installation finished.
Do you wish the installer to initialize EMAN2-SPHIRE-SPARX
by running conda init? [yes|no]
[no] >>> yes
no change     /home/muyun/eman2-sphire-sparx/condabin/conda
no change     /home/muyun/eman2-sphire-sparx/bin/conda
no change     /home/muyun/eman2-sphire-sparx/bin/conda-env
no change     /home/muyun/eman2-sphire-sparx/bin/activate
no change     /home/muyun/eman2-sphire-sparx/bin/deactivate
no change     /home/muyun/eman2-sphire-sparx/etc/profile.d/conda.sh
no change     /home/muyun/eman2-sphire-sparx/etc/fish/conf.d/conda.fish
no change     /home/muyun/eman2-sphire-sparx/shell/condabin/Conda.psm1
no change     /home/muyun/eman2-sphire-sparx/shell/condabin/conda-hook.ps1
no change     /home/muyun/eman2-sphire-sparx/lib/python3.7/site-packages/xontrib/conda.xsh
no change     /home/muyun/eman2-sphire-sparx/etc/profile.d/conda.csh
modified      /home/muyun/.bashrc

==> For changes to take effect, close and re-open your current shell. <==

If you'd prefer that conda's base environment not be activated on startup, 
   set the auto_activate_base parameter to false: 

conda config --set auto_activate_base false

验证:
(base) muyun@muyun:~/Downloads$ conda activate /home/muyun/eman2-sphire-sparx
(/home/muyun/eman2-sphire-sparx) muyun@muyun:~/Downloads$ conda list
eman-deps                 24.1                 hfe7c423_2    cryoem
eman-deps-cli             24.1                 hfe7c423_2    cryoem
eman-deps-cxx             24.1                 hfe7c423_2    cryoem
eman2                     2.91                 h2bc3f7f_0    file://home/eman2/miniconda3/conda-bld

(/home/muyun/eman2-sphire-sparx) muyun@muyun:~/eman2-sphire-sparx/bin$ python
Python 3.7.9 (default, Aug 31 2020, 12:42:55) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import EMAN2
>>> print(EMAN2.print(EMANVERSION))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'EMAN2' has no attribute 'print'
>>> print(EMAN2.EMANVERSION)
EMAN 2.91 final

 
from EMAN2 import *
img = EMData("testOK.mrc", 0)
img.write_image("copy.mrc") #write a copy of the image on the disk
 
img.read_image("testOK2.mrc", 0)
img.write_image("copy2.mrc")  #write a copy of the image on the disk
  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值