Re: [sympy] Parsing expressions problem | "ImportError: Clang is not installed, cannot parse C code"

2022-04-19 Thread Audrius-St
Okay, I found "python-clang" on conda-forge and installed it.

$ conda list python-clang
# NameVersion   Build  Channel
python-clang  13.0.1  default_hccd1708_0conda-forge

I now receive the error message:

NotImplementedError: Only bool, int and float are supported

My understanding of this error message is that arrays such as 
std::array are not currently supported.
Is this correct?

On Tuesday, April 19, 2022 at 3:39:14 PM UTC-4 Audrius-St wrote:

> Thanks for your prompt reply.
>
> What is "clang-python" and from where may I download it?
>
> A search on "clang-python" did return anything obvious.
>
> Do you mean "python3-clang-13"?
>
> I suggest that the documentation be updated with this required information.
>
> On Tuesday, April 19, 2022 at 3:23:38 PM UTC-4 asme...@gmail.com wrote:
>
>> The error message should be improved there. You need clang-python.
>>
>> Aaron Meurer
>>
>> On Tue, Apr 19, 2022 at 1:20 PM Audrius-St  wrote:
>> >
>> > Hello,
>> >
>> > I am attempting to parse C code into Python using SymPyExpression but 
>> am receiving the error message "ImportError: Clang is not installed, cannot 
>> parse C code"
>> >
>> > However, I'm quite certain that I have Clang installed
>> >
>> > $ conda list clang
>> > # Name Version Build Channel
>> > clang 13.0.1 ha770c72_0 conda-forge
>> > clang-13 13.0.1 default_hc23dcda_0 conda-forge
>> > libclang-cpp13 13.0.1 default_hc23dcda_0 conda-forge
>> >
>> > Code fragment:
>> >
>> > src_X = """
>> > inline double advanceX(
>> > double const& x,
>> > double const& px,
>> > double const& y,
>> > double const& py,
>> > double const& t)
>> > // The C code output from FORM starts array indices at 1 not 0. Go 
>> figure.
>> > std::array w;
>> >
>> > w[1]=1./3.*y;
>> > w[2]=139./33. + 19./2.*y;
>> > w[2]=w[2]*w[1];
>> > . . .
>> > double x_t=w[1] + x;
>> >
>> > return x_t;
>> > """
>> >
>> > def main():
>> > p = SymPyExpression(src_X, 'c')
>> > p.convert_to_python()
>> > print('p:', p)
>> >
>> >
>> > if __name__ == "__main__":
>> > main()
>> >
>> > System:
>> > Python 3.9.12
>> > Sympy 1.10.1
>> > VS Code 1.66.2
>> > Ubuntu 20.04 on WSLg 1.0.33
>> >
>> > Is there some parameter in VS Code that I need to set?
>> > Puzzled.
>> >
>> > Another unrelated issue. Just now, when I attempt to go to 
>> https://docs.sympy.org/
>> > I receive the message
>> >
>> > 404
>> >
>> > There isn't a GitHub Pages site here.
>> >
>> >
>> > --
>> > 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+un...@googlegroups.com.
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sympy/5a69ee30-2084-4f8c-929e-ddab57e254b0n%40googlegroups.com
>> .
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/da6a78cd-c11f-4d44-a9af-9e98cff60888n%40googlegroups.com.


Re: [sympy] Parsing expressions problem | "ImportError: Clang is not installed, cannot parse C code"

2022-04-19 Thread Isuru Fernando
It should be python-clang.

Isuru

On Tue, Apr 19, 2022 at 2:23 PM Aaron Meurer  wrote:

> The error message should be improved there. You need clang-python.
>
> Aaron Meurer
>
> On Tue, Apr 19, 2022 at 1:20 PM Audrius-St 
> wrote:
> >
> > Hello,
> >
> > I am attempting to parse C code into Python using SymPyExpression but am
> receiving the error message "ImportError: Clang is not installed, cannot
> parse C code"
> >
> > However, I'm quite certain that I have Clang installed
> >
> > $ conda list clang
> > # NameVersion Build  Channel
> > clang 13.0.1   ha770c72_0conda-forge
> > clang-13   13.0.1   default_hc23dcda_0conda-forge
> > libclang-cpp13 13.0.1  default_hc23dcda_0conda-forge
> >
> > Code fragment:
> >
> > src_X = """
> > inline double advanceX(
> > double const& x,
> > double const& px,
> > double const& y,
> > double const& py,
> > double const& t)
> > // The C code output from FORM starts array indices at 1 not 0. Go
> figure.
> > std::array w;
> >
> > w[1]=1./3.*y;
> > w[2]=139./33. + 19./2.*y;
> > w[2]=w[2]*w[1];
> > . . .
> > double x_t=w[1] + x;
> >
> > return x_t;
> > """
> >
> > def main():
> > p = SymPyExpression(src_X, 'c')
> > p.convert_to_python()
> > print('p:', p)
> >
> >
> > if __name__ == "__main__":
> > main()
> >
> > System:
> > Python 3.9.12
> > Sympy 1.10.1
> > VS Code 1.66.2
> > Ubuntu 20.04 on WSLg 1.0.33
> >
> > Is there some parameter in VS Code that I need to set?
> > Puzzled.
> >
> > Another unrelated issue. Just now, when I attempt to go to
> https://docs.sympy.org/
> > I receive the message
> >
> > 404
> >
> > There isn't a GitHub Pages site here.
> >
> >
> > --
> > 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/5a69ee30-2084-4f8c-929e-ddab57e254b0n%40googlegroups.com
> .
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/CAKgW%3D6LzBM32J9_%3DMK0na7SZeC5VBn335u2AYJJa0x%3Dpajppgg%40mail.gmail.com
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CA%2B01voP-rNCKuH1segyvsjEHCWBu5W5bsjbJ12SDzHXU155RWA%40mail.gmail.com.


Re: [sympy] Parsing expressions problem | "ImportError: Clang is not installed, cannot parse C code"

2022-04-19 Thread Audrius-St
Thanks for your prompt reply.

What is "clang-python" and from where may I download it?

A search on "clang-python" did return anything obvious.

I suggest that the documentation be updated with this required information.
On Tuesday, April 19, 2022 at 3:23:38 PM UTC-4 asme...@gmail.com wrote:

> The error message should be improved there. You need clang-python.
>
> Aaron Meurer
>
> On Tue, Apr 19, 2022 at 1:20 PM Audrius-St  wrote:
> >
> > Hello,
> >
> > I am attempting to parse C code into Python using SymPyExpression but am 
> receiving the error message "ImportError: Clang is not installed, cannot 
> parse C code"
> >
> > However, I'm quite certain that I have Clang installed
> >
> > $ conda list clang
> > # Name Version Build Channel
> > clang 13.0.1 ha770c72_0 conda-forge
> > clang-13 13.0.1 default_hc23dcda_0 conda-forge
> > libclang-cpp13 13.0.1 default_hc23dcda_0 conda-forge
> >
> > Code fragment:
> >
> > src_X = """
> > inline double advanceX(
> > double const& x,
> > double const& px,
> > double const& y,
> > double const& py,
> > double const& t)
> > // The C code output from FORM starts array indices at 1 not 0. Go 
> figure.
> > std::array w;
> >
> > w[1]=1./3.*y;
> > w[2]=139./33. + 19./2.*y;
> > w[2]=w[2]*w[1];
> > . . .
> > double x_t=w[1] + x;
> >
> > return x_t;
> > """
> >
> > def main():
> > p = SymPyExpression(src_X, 'c')
> > p.convert_to_python()
> > print('p:', p)
> >
> >
> > if __name__ == "__main__":
> > main()
> >
> > System:
> > Python 3.9.12
> > Sympy 1.10.1
> > VS Code 1.66.2
> > Ubuntu 20.04 on WSLg 1.0.33
> >
> > Is there some parameter in VS Code that I need to set?
> > Puzzled.
> >
> > Another unrelated issue. Just now, when I attempt to go to 
> https://docs.sympy.org/
> > I receive the message
> >
> > 404
> >
> > There isn't a GitHub Pages site here.
> >
> >
> > --
> > 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+un...@googlegroups.com.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/5a69ee30-2084-4f8c-929e-ddab57e254b0n%40googlegroups.com
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/3f77edee-b2e4-4bce-b3d9-28bc18707b3fn%40googlegroups.com.


Re: [sympy] Parsing expressions problem | "ImportError: Clang is not installed, cannot parse C code"

2022-04-19 Thread Aaron Meurer
The error message should be improved there. You need clang-python.

Aaron Meurer

On Tue, Apr 19, 2022 at 1:20 PM Audrius-St  wrote:
>
> Hello,
>
> I am attempting to parse C code into Python using SymPyExpression but am 
> receiving the error message "ImportError: Clang is not installed, cannot 
> parse C code"
>
> However, I'm quite certain that I have Clang installed
>
> $ conda list clang
> # NameVersion Build  Channel
> clang 13.0.1   ha770c72_0conda-forge
> clang-13   13.0.1   default_hc23dcda_0conda-forge
> libclang-cpp13 13.0.1  default_hc23dcda_0conda-forge
>
> Code fragment:
>
> src_X = """
> inline double advanceX(
> double const& x,
> double const& px,
> double const& y,
> double const& py,
> double const& t)
> // The C code output from FORM starts array indices at 1 not 0. Go figure.
> std::array w;
>
> w[1]=1./3.*y;
> w[2]=139./33. + 19./2.*y;
> w[2]=w[2]*w[1];
> . . .
> double x_t=w[1] + x;
>
> return x_t;
> """
>
> def main():
> p = SymPyExpression(src_X, 'c')
> p.convert_to_python()
> print('p:', p)
>
>
> if __name__ == "__main__":
> main()
>
> System:
> Python 3.9.12
> Sympy 1.10.1
> VS Code 1.66.2
> Ubuntu 20.04 on WSLg 1.0.33
>
> Is there some parameter in VS Code that I need to set?
> Puzzled.
>
> Another unrelated issue. Just now, when I attempt to go to 
> https://docs.sympy.org/
> I receive the message
>
> 404
>
> There isn't a GitHub Pages site here.
>
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/5a69ee30-2084-4f8c-929e-ddab57e254b0n%40googlegroups.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6LzBM32J9_%3DMK0na7SZeC5VBn335u2AYJJa0x%3Dpajppgg%40mail.gmail.com.


[sympy] Parsing expressions problem | "ImportError: Clang is not installed, cannot parse C code"

2022-04-19 Thread Audrius-St
Hello,

I am attempting to parse C code into Python using SymPyExpression but am 
receiving the error message "ImportError: Clang is not installed, cannot 
parse C code"

However, I'm quite certain that I have Clang installed

$ conda list clang
# NameVersion Build  Channel
clang 13.0.1   ha770c72_0conda-forge
clang-13   13.0.1   default_hc23dcda_0conda-forge
libclang-cpp13 13.0.1  default_hc23dcda_0conda-forge

Code fragment:

src_X = """
inline double advanceX(
double const& x,
double const& px,
double const& y,
double const& py,
double const& t)
// The C code output from FORM starts array indices at 1 not 0. Go 
figure.
std::array w; 

w[1]=1./3.*y;
w[2]=139./33. + 19./2.*y;
w[2]=w[2]*w[1];
. . .
double x_t=w[1] + x;
 
return x_t;
"""

def main():
p = SymPyExpression(src_X, 'c')
p.convert_to_python()
print('p:', p)


if __name__ == "__main__":
main()

System:
Python 3.9.12
Sympy 1.10.1
VS Code 1.66.2
Ubuntu 20.04 on WSLg 1.0.33

Is there some parameter in VS Code that I need to set?
Puzzled.

Another unrelated issue. Just now, when I attempt to go 
to https://docs.sympy.org/
I receive the message 

404

There isn't a GitHub Pages site here.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/5a69ee30-2084-4f8c-929e-ddab57e254b0n%40googlegroups.com.