@BlackJack
Code: Alles auswählen
Python 2.7.3 (default, May 14 2012, 14:13:50)
[GCC 4.4.5 20110214 (Red Hat 4.4.5-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy.random
>>> print numpy.random.mtrand
<module 'numpy.random.mtrand' from '/usr/local/lib/python2.7/site-packages/numpy/random/mtrand.so'>
>>> dir(numpy.random.mtrand)
['RandomState', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__test__', '_rand', 'beta', 'binomial', 'bytes', 'chisquare', 'dirichlet', 'exponential', 'f', 'gamma', 'geometric', 'get_state', 'gumbel', 'hypergeometric', 'laplace', 'logistic', 'lognormal', 'logseries', 'multinomial', 'multivariate_normal', 'negative_binomial', 'noncentral_chisquare', 'noncentral_f', 'normal', 'np', 'pareto', 'permutation', 'poisson', 'power', 'rand', 'randint', 'randn', 'random_integers', 'random_sample', 'rayleigh', 'seed', 'set_state', 'shuffle', 'standard_cauchy', 'standard_exponential', 'standard_gamma', 'standard_normal', 'standard_t', 'triangular', 'uniform', 'vonmises', 'wald', 'weibull', 'zipf']
I have also Python 2.6.6 installed as default python (because i need it for another program) and 2.6.6 is the python which comes with scientific linux 6.1 (=RHEL 6.1), but I start the script with <python2.7 script.py> and numpy is installed with/for python 2.7.
Could this be a problem?
Could I change the script to <import numpy.random> to bypass the error? I will try.
If I use <import numpy.random> in this script, I get errors downstream from other moduls:
Code: Alles auswählen
Traceback (most recent call last):
File "/home/ws/SW_install/RSeQC/usr/local/bin/bam_stat.py", line 24, in <module>
from qcmodule import SAM
File "/home/ws/SW_install/RSeQC/usr/local/lib/python2.7/site-packages/qcmodule/SAM.py", line 23, in <module>
import pysam
File "/home/ws/SW_install/RSeQC/usr/local/lib/python2.7/site-packages/pysam/__init__.py", line 1, in <module>
from csamtools import *
File "csamtools.pyx", line 4, in init csamtools (lib/pysam/csamtools.c:32735)
File "/usr/local/lib/python2.7/tempfile.py", line 34, in <module>
from random import Random as _Random
ImportError: cannot import name Random