Thanks, you were right! I updated to 8.1 and did everything again, and it 
works now! Not sure what the problem was.
It's not too fast (30 seconds to execute) but it works. But I still have to 
execute in the Sage shell
sage-preparse filename.sage
in order to generate a python file with the proper syntax.

I'm now trying to figure out how to run a Sage shell command from something 
like a batch file which I hope PyCharm could maybe execute, but I'm not 
sure if this is the way to go. As you said, this is a whole new problem.

At least when it would work, then I would write sage in a filename.sage 
file in PyCharm, then run and see the output within PyCharm. Would be 
awesome!

On Thursday, December 21, 2017 at 10:54:26 AM UTC+1, Erik Bray wrote:
>
> On Wed, Dec 20, 2017 at 8:59 AM, PHPirate <holland...@gmail.com 
> <javascript:>> wrote: 
> > Thanks to Erik Bray PyCharm does now successfully (see ask.sagemath.org) 
>
> > recognise Sage's python. Also in the packages list Sage shows. 
> > 
> > When I now try to 
> > from sage.all import * 
> >  I get 
> > RuntimeError: libSingular not found--a working Singular install in 
> > $SAGE_LOCAL is required for Sage to work 
> > 
> > ideas? 
>
> I'd have to see exactly what environment variables you set.  When I 
> did this, according to the instructions I gave, I did not have this 
> problem. 
>
> > On Friday, December 15, 2017 at 6:23:51 PM UTC+1, PHPirate wrote: 
> >> 
> >> I already tried asking at SO and ask.sagemath.org but I couldn't reach 
> any 
> >> Windows users of Sage, then I tried at the GitHub Windows release repo 
> with 
> >> results of the previous questions and there someone referred me here so 
> here 
> >> is the copy of my question: 
> >> 
> >> My question: 
> >> In order to make Sage really a success for me I want a proper IDE. I 
> want 
> >> to be able to edit and run Sage scripts with PyCharm. How do I do this 
> on 
> >> Windows? 
> >> 
> >> I think there exist people running this setup on Linux, so I think it 
> >> should be possible on Windows as well. 
> >> 
> >> My attempt currently consists of running inside the Sage shell 
> >> 
> >> SAGE_ROOT="C:/Program Files/SageMath 8.0/runtime/opt/sagemath-8.0" 
> >> sage -sh 
> >> cd "C:/Program Files/JetBrains/PyCharm 2017.2.3/bin" 
> >> ./pycharm.exe 
> >> 
> >> 
> >> In the PyCharm project I selected my system wide python2.7 as 
> interpreter, 
> >> but I get `no module named sage.all` which makes sense because I didn't 
> >> install the module into my system wide python. 
> >> 
> >> After `sage -sh` I checked with `printenv SAGE_ROOT` that the 
> environment 
> >> variable was set correctly. 
> >> 
> >> I did figure out that Sage's `sage.all` module is installed in Sage's 
> >> python, at `C:\Program Files\SageMath 
> >> 8.0\runtime\opt\sagemath-8.0\local\lib\python2.7\site-packages\sage`. 
> But 
> >> PyCharm does not want to recognise Sage's python as a valid 
> interpreter. 
> >> 
> >> I also tried `setx PYTHONPATH "C:/Program Files/SageMath 
> >> 8.0/runtime/opt/sagemath-8.0/local/lib/python2.7/site-packages/sage" 
> /M` 
> >> (sets the system environment variable) in the hope that it would make 
> python 
> >> find the packages, 
> >> 
> >> I also figured that it didn't make sense to just copy the sage module 
> into 
> >> my system wide python installation, because the module makes use of for 
> >> example `os.uname` which is not available on Windows. That said, I have 
> no 
> >> clue at all how the Sage console even works :) 
> >> 
> >> PS Actually this is the only thing withholding me from spreading Sage 
> in 
> >> my university, since the console and SageTeX work fine - although the 
> >> console takes 45 secs up to a minute to start and SageTeX instructions 
> are 
> >> not made for windows. 
> >> PPS Glad to see that since I installed Sage from here the number of 
> stars 
> >> went from 2 to 16, keep it going :) 
> >> PPPS Just saw you have released Sage 8.1 an hour ago, not sure if that 
> >> affects anything. Will update Sage later. 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "sage-devel" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to sage-devel+...@googlegroups.com <javascript:>. 
> > To post to this group, send email to sage-...@googlegroups.com 
> <javascript:>. 
> > Visit this group at https://groups.google.com/group/sage-devel. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to