简体   繁体   English

Python3.7 在 linux 上的模块加载期间未显示

[英]Python3.7 not showing up during module load on linux

I've installed python3.7 on my school's computing cluster without using pip or sudo.我已经在我学校的计算集群上安装了 python3.7,而没有使用 pip 或 sudo。 I added the python path to $PATH variable in the bashrc.我将 python 路径添加到 bashrc 中的$PATH变量。 But it still doesnt show the module when I try to do module spider python .但是当我尝试做module spider python时,它仍然没有显示模块。 Am I missing any steps?我错过了任何步骤吗? Thanks in advance提前致谢

To find a newly installed software through the module command, there should be a modulefile describing this software installation under an enabled modulepath.要通过module命令查找新安装的软件,在启用的模块路径下应该有一个描述该软件安装的模块文件。

Let's say /usr/share/modulefiles is a directory containing modulefiles.假设/usr/share/modulefiles是一个包含模块文件的目录。 Create a python directory in this modulepath directory.在此 modulepath 目录中创建python目录。 Then create the 3.7 file in this directory:然后在这个目录下创建3.7文件:

#%Module
append-path PATH /the/path/to/your/python/3.7/installation

With this new file create in the modulepath directory, you have create a new modulefile: python/3.7 .在 modulepath 目录中创建这个新文件后,您已经创建了一个新的模块文件: python/3.7

Enable the modulepath directory:启用模块路径目录:

$ module use /usr/share/modulefiles

Now you can see the python/3.7 module:现在您可以看到python/3.7模块:

$ module av python
--------- /usr/share/modulefiles ---------
python/3.7

$ module show python/3.7
-------------------------------------------------------------------
/usr/share/modulefiles/python/3.7:

append-path     PATH /the/path/to/your/python/3.7/installation
-------------------------------------------------------------------

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM