8606 views|1 replies

15

Posts

0

Resources
The OP
 

[Raspberry Pi 3B+ Review] Configuring the Development Environment [Copy link]

This post was last edited by icefire2012 on 2018-9-16 19:27 1. Raspberry Pi 3B+ Software Source In the process of configuring the development environment, many software packages need to be installed. In the process, some software packages cannot be downloaded or the download time is very long. This is mainly because the default mirror source of the system is abroad. I tried several sources in China, and the one from Tsinghua University is relatively easy to use in my network environment. The configuration method is to modify the two files /etc/apt/sources.list and /etc/apt/sources.list.d/raspi.list, comment out the original content, and add the content corresponding to Tsinghua's source. The specific operations are:
  1. sudo nano /etc/apt/sources.list
复制代码
Comment out the original content with # and add the following:
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
[color=#33 3333] deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ [color=#333333 ]stretch main contrib non-free rpi
  1. sudo nano /etc/apt/sources.list.d/raspi.list
复制代码
Comment out the original content with # and add the following: deb http://mirror.tuna.tsinghua.edu.cn/raspberrypi/ stretch main ui deb-src [color=#33 3333]http://mirror.tuna.tsinghua.edu.cn/raspberrypi/ stretch main ui [align= center] [ /color] Finally, perform the following update operations:
  1. sudo apt-get update sudo apt-get upgrade
复制代码
2. Install Vscode In the following evaluation tasks, Python language will be used all the time. I have just started learning Python language. If you want to do your work well, you must first sharpen your tools. An excellent IDE can improve the efficiency of Python development and learning. I use Visual Studio Code (https://code.visualstudio.com/ ). Visual Studio Code is referred to as vscode. I chose it as the IDE for Python mainly because of its following features: * Free and open source, and supports Windows, Linux and Mac platforms at the same time * Lightweight, the installation package is only tens of megabytes * Rich hotkey setting plug-ins, which can simulate the hotkey styles of other common editors, such as vim * Supports syntax highlighting, intelligent code completion, bracket matching and other functions of Python and other mainstream languages
* Python can be debugged through plug-in extensions The deb package on the vscode official website is for the x86 platform, and there is no direct installation package for the armhf platform. I tried to download the source code from github and compile the installation package, but failed. Finally, I found a compiled installation package for the armhf platform on the Internet (download address
链接已隐藏,如需查看请登录或者注册
). You can run the installation directly.
If the installation is successful, the way to start vscode is: Start Menu-->Programming-->Code-OSS If you log in via VNC, an error will be reported in the terminal when starting vscode. After startup, vscode only has the menu bar, and the rest is blank, as shown below:
To solve this problem, you need to do the following:
  1. sudo cp /usr/lib/arm-linux-gnueabihf/libxcb.so.1 /usr/share/code-oss sudo cp /usr/lib/arm-linux-gnueabihf/libxcb.so.1.1.0 /usr/share/code-oss
复制代码
Enter the installation directory of vscode
  1. cd /usr/share/code-oss/
复制代码
Then execute
  1. sudo sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' libxcb.so.1 sudo sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' libxcb.so.1.1.0
复制代码
After doing the above operations, when starting vscode, the above error will still be reported in the terminal, but it can be started normally in the end. The screenshot after normal startup is as follows: You can click the fifth button from the top to the bottom on the left to search and install some extension plug-ins used to write Python programs, as shown in the figure below:
The following is a video of the effect of the debugging process:
"] To solve this problem, you need to do the following:
  1. sudo cp /usr/lib/arm-linux-gnueabihf/libxcb.so.1 /usr/share/code-oss sudo cp /usr/lib/arm-linux-gnueabihf/libxcb.so.1.1.0 /usr/share/code-oss
复制代码
Enter the installation directory of vscode
  1. cd /usr/share/code-oss/
复制代码
Then execute
  1. sudo sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' libxcb.so.1 sudo sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' libxcb.so.1.1.0
复制代码
After doing the above operations, when starting vscode, the above error will still be reported in the terminal, but it can eventually start normally. The screenshot after normal startup is as follows:
You can click the fifth button from the top to the bottom on the left to search for and install some extension plug-ins used to write python programs, as shown in the figure below:
The following is the effect video of the debugging process:
"] To solve this problem, you need to do the following:
  1. sudo cp /usr/lib/arm-linux-gnueabihf/libxcb.so.1 /usr/share/code-oss sudo cp /usr/lib/arm-linux-gnueabihf/libxcb.so.1.1.0 /usr/share/code-oss
复制代码
Enter the installation directory of vscode
  1. cd /usr/share/code-oss/
复制代码
Then execute
  1. sudo sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' libxcb.so.1 sudo sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' libxcb.so.1.1.0
复制代码
After doing the above operations, when starting vscode, the above error will still be reported in the terminal, but it can eventually start normally. The screenshot after normal startup is as follows:
You can click the fifth button from the top to the bottom on the left to search for and install some extension plug-ins used to write python programs, as shown in the figure below:
The following is the effect video of the debugging process:





















This post is from MCU

Latest reply

Continue  Details Published on 2018-9-19 12:13
 

6063

Posts

4

Resources
2
 
Continue
This post is from MCU
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list