Pycharm online/manual offline installation of third-party libraries - take scapy as an example (adding installed third-party libraries locally offline is achieved by adding Path)

  • Online installation
  1. Run Pycharm, open the project that needs to add the scapy file, take TestScapy as an example           
  2. Click the File option on the toolbar, select Settings, and click Open                                                                       
  3. Select the Project->Project Interpreter option of Settings                       
  4. Click the '+' button on the option bar on the right, search for the name of the third-party library you want to add in the search box of Available Packages that pops up, such as scapy, select the desired search result, click Install Package, and wait for the installation You can do it successfully.                                    
  5. Sign of successful installation:


  • Local installation - by adding the Path of the third-party library
  1. The first two are the same as the online installation, and then in the Settings window that opens, select Settings -> Show all
  2. In the pop-up Program Interpreters window, select the fifth button, click the '+' button in the pop-up Interpreter Patha window, and in the pop-up Select Path window, select the path where the local third-party library file (such as Scapy) is added, and click 'OK' button to complete the configuration.                                                   
  3. After the addition is successful, there will be one more line in the Inerpreter Paths window, click ok to confirm, and exit and re-run the program (Note: You need to wait for the pycharm update configuration to complete before it can run successfully. There is a progress bar at the bottom of pycharm that shows the update progress)

        




Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324663062&siteId=291194637