我是IPython Notebook的新手.我在CrunchBang(华尔道夫)上使用Anaconda发行版.我的开发周期如下:
1. Open Spyder.
2. Open the .py file if not already loaded
3. Start IPython Notebook
4. Open the specific notebook from the main IPython screen
5. Select Cell/Run All
6. Note errors. If none goto step 11.
7. Save and close the notebook
8. Shutdown the notebook from main IPython screen
9. Correct errors in Spyder and save
10. go to step 4
11. Move on to the next part of the project and start the process …Run Code Online (Sandbox Code Playgroud) 当从Linux Mint 13上的Anaconda python安装启动Spyder时,我收到以下错误:
Cannot mix incompatible Qt library (version 0x40801) with this library (version 0x40805)
Aborted
Run Code Online (Sandbox Code Playgroud)
$ PATH是
/home/ron/anaconda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
Run Code Online (Sandbox Code Playgroud)
有人找到了解决方法吗?
Anaconda网站表明Spyder可能无法在Linux机器上正确启动.
http://docs.continuum.io/anaconda/
Run Code Online (Sandbox Code Playgroud)
***解决了我有点羞怯.发现我安装了Anaconda作为sudo.如文档中所示重新安装,一切正常.谢谢大家的帮助.
我在iPython Notebook中有以下Sympy相关代码:
from sympy import *
init_printing()
Run Code Online (Sandbox Code Playgroud)
...
定义常量
c, d, e, f = symbols("c, d, e, f")
Run Code Online (Sandbox Code Playgroud)
...
定义两个矩阵
v = Matrix(2,1,[1,1])
w = Matrix(2,1,[2,3])
Run Code Online (Sandbox Code Playgroud)
定义符号矩阵
v, v1, v2 = symbols("v, v1, v2")
v = Matrix(2,1, [v1, v2])
w, w1, w2 = symbols("w, w1, w2")
w = Matrix(2,1, [w1, w2])
Run Code Online (Sandbox Code Playgroud)
添加符号向量v&w
v + w
Run Code Online (Sandbox Code Playgroud)
导致以下错误消息
/home/ron/anaconda/lib/python2.7/site-packages/IPython/core/formatters.py:239: FormatterWarning: Exception in image/png formatter:
\left[\begin{smallmatrix}v_{1} + w_{1}\\v_{2} + w_{2}\end{smallmatrix}\right]
^
Expected "\right" (at char 6), (line:1, col:7)
FormatterWarning,
Run Code Online (Sandbox Code Playgroud)
然后产生正确的答案
[v1+w1v2+w2]
Run Code Online (Sandbox Code Playgroud)
为了在gfortran中编译MPI代码,我必须使用语法
include mpif.h
Run Code Online (Sandbox Code Playgroud)
在我的代码而不是
use mpi
Run Code Online (Sandbox Code Playgroud)
有几个网站表明这个语法适用于Fortran 77,但我使用gfortran gcc版本4.7.2(Debian 4.7.2-5)和mpfi90用于MPICH2版本1.4.1p1.
命令行
mpif90 test1.f90 -o test1.exe
Run Code Online (Sandbox Code Playgroud)
产生以下错误
test1.f90:4.8: use mpi 1 Fatal Error: Parse error when checking module version for file 'mpi.mod' opened at (1)
Run Code Online (Sandbox Code Playgroud)
test1.f90(来自关于HPC的Coursera课程)
program test1
use mpi !(fails to compile)
implicit none
include 'mpif.h' !(this works)
integer :: ierr, numprocs, proc_num
call mpi_init(ierr)
call mpi_comm_size(MPI_COMM_WORLD, numprocs, ierr)
call mpi_comm_rank(MPI_COMM_WORLD, proc_num, ierr)
print *, 'Hello from Process number', proc_num, &
' of ', numprocs, ' processes'
call mpi_finalize(ierr)
end …Run Code Online (Sandbox Code Playgroud)