Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to Repeat Example 1 #1

Closed
yxu148 opened this issue Nov 2, 2022 · 2 comments
Closed

Fail to Repeat Example 1 #1

yxu148 opened this issue Nov 2, 2022 · 2 comments

Comments

@yxu148
Copy link

yxu148 commented Nov 2, 2022

Hi,

I copied and pasted all codes from

example_1_pyloric_network.ipynb

and ran in Spyder with Python3.7.

I didn't run the plotting codes to test if the codes work. There is an error, and the error message says

Cannot find Microsoft Visual Studio, You can try to set the path to vcvarsall.bat via the codegen.cpp.msvc_vars_location preference explicitly.

Should I use Visual Studio instead?

@mstimberg
Copy link
Member

Hi @yxu148 . For efficiency reasons, the example switches on code generation for C++ with the line:

set_device('cpp_standalone', build_on_run=False)

For this to work, you need to have a working C++ compiler installed as explained here: https://brian2.readthedocs.io/en/stable/introduction/install.html#requirements-for-c-code-generation

Alternatively, you can remove the set_device(...) line – the simulation will run, but just not as fast.

@yxu148
Copy link
Author

yxu148 commented Nov 3, 2022

Hi Marcel,

Thanks for your reply. Problems solved!

@yxu148 yxu148 closed this as completed Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants