一、内容

1. 编译器

  • gcc:GNU编译器套装
  • C++ builder
  • Microsoft Visual C++(MSVC):微软的VC编译器
  • MinGW(Minimalist GNU on Windows):可自由使用和自由发布的Windows特定头文件和使用GNU工具集导入库的集合,允许你在GNU/Linux和Windows平台生成本地的Windows程序而不需要第三方C运行时库。MinGw是windows版本的gcc集合

2. 版本控制

  • git

3. Python环境

  • Anaconda \ Miniconda

4. 安装python包或库

  • pythonn -m pip install ...
  • pip/conda install ...

5. jupyter 使用

二、GCC安装和使用

GCC是由GNU开发的编程语言译器。最近复现代码时需要编译源文件,总是报错,后来查验报错原因后,是由于电脑没能安装GCC。C 语言编译器用于把源代码编译成最终的可执行程序。

Windows

1. 使用w64devkit(免安装)

w64devkit 是 Windows 平台下使用的一个 C/C++ 跨平台编译环境。它可以在 Windows 上编译出能够在多个平台上运行的程序,例如:Windows, Linux, macOS。w64devkit 包含了大量的开源工具链和库,如 GCC,Binutils,Mingw-w64,MSYS2 等等。它可以提供一个强大的编译环境,使得 Windows 平台的程序员们能够更容易地开发跨平台的程序。
https://github.com/skeeto/w64devkit/releases/

2. 环境变量设置

3. 测试

gcc -v

三、Git下载

Git - Downloads

免安装版本直接配置环境变量即可

四、conda环境

1. 获取miniconda

wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
echo ". /USER/miniconda3/etc/profile.d/conda.sh" >> ~/.bashrc
echo ". /USER/miniconda3/etc/profile.d/conda.sh" >> ~/.benv
source ~/.benv

安装包完成后清楚安装包,Once the installation is finished, to recover some disk space we can clear the package tarballs Conda just downloaded:

conda clean -t

五、jupyter使用

Magics

There are a range of magic commands in IPython notebooks, than provide helpful tools outside of the usual Python syntax. A full list of the inbuilt magic commands is given here, however three that are particularly useful for this course:

  • %%timeit Put at the beginning of a cell to time its execution and print the resulting timing statistics.
  • %precision Set the precision for pretty printing of floating point values and NumPy arrays.
  • %debug Activates the interactive debugger in a cell. Run after an exception has been occured to help diagnose the issue.

# use the matplotlib magic to specify to display plots inline in the notebook

%matplotlib inline

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐