I generally use virtual environments to test development versions of
Python libraries. Within the virtual environment you can install the
library using pip install -e.

Create and activate virtualenv:

enojb@IT035770:~/current/tmp$ mkdir pypydemo
enojb@IT035770:~/current/tmp$ cd pypydemo/
enojb@IT035770:~/current/tmp/pypydemo$ pypy -m virtualenv mypypyenv
...
enojb@IT035770:~/current/tmp/pypydemo$ . mypypyenv/bin/activate

Clone and install sympy as "editable":

(mypypyenv) enojb@IT035770:~/current/tmp/pypydemo$ git clone
https://github.com/sympy/sympy.git
...
(mypypyenv) enojb@IT035770:~/current/tmp/pypydemo$ cd sympy/
(mypypyenv) enojb@IT035770:~/current/tmp/pypydemo/sympy$ pip install -e .
...
(mypypyenv) enojb@IT035770:~/current/tmp/pypydemo/sympy$ cd ..

Test and run:

(mypypyenv) enojb@IT035770:~/current/tmp/pypydemo$ isympy
Couldn't locate IPython. Having IPython installed is greatly recommended.
See http://ipython.scipy.org for more details. If you use Debian/Ubuntu,

just install the 'ipython' package and start isympy again.

Python console for SymPy 1.4.dev (Python 2.7.13-64-bit) (ground types: python)
These commands were executed:
>>> from __future__ import division
>>> from sympy import *
>>> x, y, z, t = symbols('x y z t')
>>> k, m, n = symbols('k m n', integer=True)
>>> f, g, h = symbols('f g h', cls=Function)
>>> init_printing()
Documentation can be found at https://docs.sympy.org/dev
Python 2.7.13 (ab0b9caf307db6592905a80b8faffd69b39005b8, Jun 24 2018, 08:19:27)
[PyPy 6.0.0 with GCC 4.2.1 Compatible Apple LLVM 9.1.0
(clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(SymPyConsole)
>>> from sympy import __version__
>>> __version__
1.4.dev

Having set this up in future you only need to activate the virtualenv.
Changing branches with git will automatically update the code used for
"sympy" in the virtualenv.

--
Oscar


On Sun, 10 Mar 2019 at 23:32, Rathmann <rathmann...@gmail.com> wrote:
>
> When I was using a development repository and wanted to test with PyPy, I 
> wrote a little bash function that would set PYTHONPATH to include whatever 
> repository I was interested in, and then call PyPy.  That way I didn't need 
> to change my environment, and could easily switch from tree to tree.
>
> Now, on one of my Ubuntu installs, I don't have any of the Git tools, but 
> just installed Sympy from the regular Ubuntu channel using Synaptic.   
> (Ubuntu 18.10 currently has version 1.2, so not quite up to date, but very 
> functional.)    Works nicely, and integrates with Jupyter notebook, etc.
>
> But, if I want to use PyPy, it doesn't see the Sympy install.  (This is a 
> generic PyPy / debian issue, I think.  PyPy doesn't seem to find any of the 
> extra packages that you install.)
>
> Have other people in the community taken the Ubuntu install route?  Is there 
> a reasonable technique for dealing with this situation?   I suppose I could 
> use the PYTHONPATH=... trick, but was wondering if there was a more easily 
> maintainable approach?
>
> I know I could use Anaconda or pip, but as a general rule like to use the 
> Ubuntu repositories where they are available.   I figure it it is easier to 
> administer a machine if all my packages are installed/updated with the same 
> tools.
>
> If there is a good solution, AND there is a consensus that it is worth 
> documenting, I volunteer to add it to the "Other methods" paragraph of the 
> installation section of the docs.
>
> Thanks.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/c98b85f1-042b-41c8-b819-afe53318b6fb%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAHVvXxRs1%3D5GrMdmi8%2BzE%3DXz3F%2BF%2BJhsPUO37FSS4STX1WzMBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to