I just cd into the git directory (I don't know if such a thing is  
possible in Windows).  If I import sympy and my working directory is  
the git directory, it finds that sympy first, and uses it.  Otherwise,  
if my working directory is any other directory, it uses the installed  
version of sympy.  Fink also puts an "isympy-py26" in my path that is  
a symbolic link to the installed sympy.  If whatever runs python in  
Windows doesn't seem to allow you to change the working directory, you  
can do

import os
os.chdir("<path-to-git-sympy>")

I think Robert's hint will make it so that it always finds the git  
sympy first, if that's what you want (I don't know for sure though.   
Test it).

Aaron Meurer

On Jun 6, 2009, at 8:12 PM, smichr wrote:

>
> I am having some problems with sympy and am wondering if it is related
> to sympy being in a git directory and in my site-packages. What I have
> been doing to run sympy is to copy all files from the git directory
> into my site-packages directory. But today I ran into a strange
> problem where something I was passing to the roots routine was not
> being received. And in the traceback I saw that I had a mix of files
> involved, some from my site-packages and one from the git directory.
>
> The source code file that I was working with was on the desktop.
>
> ###
> 1  sending to roots: 1/x x
> 2  Traceback (most recent call last):
> 3    File "<interactive input>", line 1, in <module>
> 4    File "C:\Documents and Settings\chris\Desktop\symp.py", line 740,
> in solv
> 5      rv= solv1(f, symbol)
> 6    File "C:\Documents and Settings\chris\Desktop\symp.py", line
> 1173, in solv1
> 7      rv.extend(roots((lhs-rhs).as_poly(symbol), cubics=True,
> quartics=True).keys())
> 8    File "C:\Documents and Settings\chris\sympy\sympy\polys
> \rootfinding.py", line 190, in roots
> 9      f = Poly(f, *symbols)
> 10   File "C:\Python26\lib\site-packages\sympy\polys\polynomial.py",
> line 300, in __new__
> 11     raise SymbolsError("No symbols were given")
> 12 SymbolsError: No symbols were given
> ###
>
> (Line numbers are my own in the above.) In line 1
>   I print what I am sending to the roots routine.
>   But in line 8 the git directory version of rootfinding is being
> referenced.
>   And then in 10, a file in the site-packages is being referenced.
>
> How do others incorporate their git directory into python locally? Do
> you make the git directory for sympy in site-packages, put it on the
> path and use only that copy, or something else?
>
> Thanks for any help,
> /c
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to