newbie: installing setuptools
Hey, I am new to python and facing problem with installing packages. I am using VPython which requires Python 2.7.x from python.org; it will not work with versions of Python other than the one from python.org. So I need to install packages separately. I was trying to install scipy-0.14.0, it gives following error: Warning (from warnings module): File "C:\Python27\lib\distutils\dist.py", line 267 warnings.warn(msg) UserWarning: Unknown distribution option: 'test_suite' So I thought maybe I need to install setuptools first. I ran setup.py file in IDLE. it runs fine and then I can import it in current session. But when I run session, it still says 'no module named setuptools'. Same thing happened when I tried to install nose. -- https://mail.python.org/mailman/listinfo/python-list
Re: newbie: installing setuptools
On Friday, December 19, 2014 10:13:15 AM UTC+5:30, Surbhi Gupta wrote: > Hey, I am new to python and facing problem with installing packages. I am > using VPython which requires Python 2.7.x from python.org; it will not work > with versions of Python other than the one from python.org. So I need to > install packages separately. > > I was trying to install scipy-0.14.0, it gives following error: > Warning (from warnings module): > File "C:\Python27\lib\distutils\dist.py", line 267 > warnings.warn(msg) > UserWarning: Unknown distribution option: 'test_suite' > > So I thought maybe I need to install setuptools first. I ran setup.py file in > IDLE. it runs fine and then I can import it in current session. But when I > run session, it still says 'no module named setuptools'. Same thing happened > when I tried to install nose. OK, the problem is now resolved: I just found out that we need to install from prompt instead of IDLE. Setuptools is installed, but I am not able to use easy_install from prompt. It says: easy_install : The term 'easy_install' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + easy_install + + CategoryInfo : ObjectNotFound: (easy_install:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException still unsuccessful in installing Scipy. -- https://mail.python.org/mailman/listinfo/python-list
Debug (sympy-Function; lambdify)
This is the code I m trying to run: from sympy import * import numpy as np from sympy import symbols def deriv(x,t): a = array(x) for i in range(0,len(x)): temp = x[i] a[i] = temp[0].diff(t) return a def matrixmult (A, B): C = [[0 for row in range(len(A))] for col in range(len(B[0]))] for i in range(len(A)): for j in range(len(B[0])): for k in range(len(B)): C[i][j] += A[i][k]*B[k][j] return C l1,l2,m1,m2,t = symbols('l1,l2,m1,m2,t') g = 10 th1 = Function('th1')(t) th2 = Function('th2')(t) th1dot = Derivative(th1, t) th2dot = Derivative(th2, t) x1 = array([[l1*sin(th1)], [-l1*cos(th1)]]) x2 = x1 + array([[l2*sin(th1 + th2)], [-l2*cos(th1 + th2)]]) x1dot = deriv(x1, t) x2dot = x1dot + deriv(x2, t) temp1 = matrixmult(x1dot.T,x1dot) temp2 = matrixmult(x2dot.T, x2dot) kin = (1/2.0)*m1*temp1[0][0] + (1/2.0)*m2*temp2[0][0] pot = -m1*g*l1*cos(th1) -m2*g*(l1*cos(th1) + l2*cos(th1+th2)) L = kin - pot e = lambdify((t, l1, l2, m1, m2, th1, th2), L) all other commands of above code run with no error. but as soon as I give last command (the lambdify 1) I get a syntax error. I think that is because I m using th1 and th2 as Function of t. Can anyone help me on how to solve this? -- https://mail.python.org/mailman/listinfo/python-list