No module named 'numpy'

311 views
Skip to first unread message

Peng Huang

unread,
Jun 19, 2021, 7:07:27 PM6/19/21
to trinityrnaseq-users
Hello there,

There's a Module Not Found Error saying the Trinity cannot load numpy as a module when I ran it on a server. Since numpy is a python module, and Trinity runs it with a built-in python script, I am not sure how to deal with it. Any suggestions?

Bellow is a copy of the error output.

Thank you for your time!

Peng 



--------------------------------------------------------------------------------
------------ Trinity Phase 2: Assembling Clusters of Reads ---------------------
------- (involving the Inchworm, Chrysalis, Butterfly trifecta ) ---------------
--------------------------------------------------------------------------------

Friday, June 18, 2021: 08:37:43 CMD: /afs/genomecenter.ucdavis.edu/software/trinity/2.9.1/lssc0-linux/trinity-plugins/BIN/ParaFly -c recursive_trinity.cmds -CPU 22 -v -shuffle
Number of Commands: 199403
succeeded(2)   0.00100299% completed.

Error encountered::  <!----
CMD: /afs/genomecenter.ucdavis.edu/software/trinity/2.9.1/lssc0-linux/Analysis/SuperTranscripts/Trinity_gene_splice_modeler.py --trinity_fasta /share/blancolab/Pistachio_annotate/trinity/trinity_out/read_partitions/Fb_1/CBin_1231/c123392.trinity.reads.fa.out/Trinity.tmp.fasta.filt --out_prefix /share/blancolab/Pistachio_annotate/trinity/trinity_out/read_partitions/Fb_1/CBin_1231/c123392.trinity.reads.fa.out/Trinity.tmp.fasta.filt.ST --incl_cdna 2>tmp.83847.1624030674.stderr

Errmsg:
Traceback (most recent call last):
    import numpy
ModuleNotFoundError: No module named 'numpy'


Tiago Hori

unread,
Jun 19, 2021, 7:17:03 PM6/19/21
to Peng Huang, trinityrnaseq-users
Type Python to get into Python shell:

Type help(“modules”)

That will list locally installed Python models. If numpy is not listed then the easiest way to install is with pip 

sudo apt install pip

pip install numpy

Realistically, pip will most likely already be there. You may not have privileges no install stuff on the server.

I cannot recall if Trinity requires Python 2 or 3. If it is 3, you may need to install numpy with pip3

T. 

“If equal affection cannot be, let the more loving one be me” W.H Auden 

On Jun 19, 2021, at 8:07 PM, 'Peng Huang' via trinityrnaseq-users <trinityrn...@googlegroups.com> wrote:

Hello there,
--
You received this message because you are subscribed to the Google Groups "trinityrnaseq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trinityrnaseq-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trinityrnaseq-users/78b36939-c159-4813-abd3-7c35c67d440cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages