• 套路【2】实验环境搭建


    在这里插入图片描述

    Environment setting is important in run a project.

    python install

    • see available python and do something with them
      Run python and see the version of it. You can also check the folder /usr/local/bin or /usr/bin since python is always installed there.
    import sys
    print(sys.executable)
    
    • 1
    • 2
    • get pakage from website
    • choose a proper version (ps: the hardest part)
      We take python3.7.0 as example
    • compile and build (ps: python depends on gcc)
    ./configure
    make
    make install
    
    • 1
    • 2
    • 3
    • build soft link (ps: for mvc)
    ln -s /usr/bin/python /usr/local/bin/python3.7 # when type `python`, you actually run `python3.7` useful for mvc
    
    • 1
    • try and test: make sure you really install the python properly
    • how to choose python version
      It depends on the pakcage that your project need --> get info from repo or try (ps: I am confused with this part😭)

    network

    • do this part first
    • basic idea: network need dns & domestic image
    • set dns set dns
      You can only have 3 dns ip
    vim /etc/resolv.conf # tmp
    vim /etc/resolvconf/resolv.conf.d/base # perm   
    # nameserver 10.3.3.3
    # nameserver 114.114.114.114
    # nameserver 8.8.8.8 
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • domestic image
    vim /etc/apt/sources.list
    # add the proper content from [网络设置清华源](https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/)
    
    • 1
    • 2
    • reboot the server

    pip install

    • sudo apt-get install pip
    • python get-pip.py (ps: recommend)
      Install get-pip.py from website and run python get-pip.py.
    • install pip from pypi
      website contains python’s all pakcages, which inlude pip. You can install pip like other pakages.

    pakage install

    • pip install [pakage name] (ps: need pip)
    • pip install [pakage name] -i [domestic image]
    you can choose domestic image from below
    https://pypi.tuna.tsinghua.edu.cn/simple/	# 清华大学
    https://mirrors.aliyun.com/pypi/simple/		# 阿里云
    https://pypi.douban.com/simple/				# 豆瓣
    https://pypi.mirrors.ustc.edu.cn/simple/	# 中国科学技术大学
    https://pypi.hustunique.com/	
    # ————————————————
    # 版权声明:本文为CSDN博主「Doris404」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    # 原文链接:https://blog.csdn.net/kullollo/article/details/109448254
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • install pakage.tar.gz from pypi and run cd [pakage] & python setup.py install
    • install pakage from pakage.whl in pypi and run pip install [pakage.whl]

    Philosophy

    goal first

    • don’t update software frequently (ps: update pip)
    • see only the important info (ps: warning is ok, useless err is ok)
      请添加图片描述
      ps: actually numpy is installed properly, but the info is really scary.

    easy first

    log and checkpoint

    • this README.md
    • env set will last long time
  • 相关阅读:
    自适应迭代扩展卡尔曼滤波算法AIEKF估计SOC VS 扩展卡尔曼估计SOC
    实验3.2 Numpy应用
    神奇的卡尔曼滤波,行人追踪的福音
    控制质量-技术或工具
    SPA项目开发之动态树+数据表格+分页
    第1章Python语言基础-1.1输入与输出
    MySQL 安装详细步骤
    Centos7如何配置实现网卡的切换
    智慧养殖方案:浅谈视频监控与AI智能识别技术助力奶牛高效、智慧养殖
    面向对象编程的六大原则
  • 原文地址:https://blog.csdn.net/kullollo/article/details/127785985