跳转至内容
  • 版块
  • 最新
  • 标签
  • 热门
  • Online Tools
  • 用户
  • 群组
折叠
品牌标识

D2Learn Forums

  1. 主页
  2. General Discussion | 综合讨论
  3. 你在干什么?

你在干什么?

已定时 已固定 已锁定 已移动 General Discussion | 综合讨论
python
73 帖子 2 发布者 601 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • 24123220292 离线
    24123220292 离线
    2412322029
    写于 最后由 编辑
    #43

    xim\xim.lua import("CmdProcessor") 这里没有CmdProcessor这个模块

    sunrisepeakS 1 条回复 最后回复
    0
    • sunrisepeakS 离线
      sunrisepeakS 离线
      sunrisepeak d2learn-dev
      在 回复了 2412322029 最后由 编辑
      #44

      @2412322029

      1a6f93ff-c004-4a78-9c2c-680d2725e9c3-image.png

      把这个加载配置代码给删除, 显示指定"https://github.com/d2learn/xim-pkgindex" 试一试, 可能是这个问题

      -- remote package repo manager
      -- 1. auto update - enable or disable | day week month
      -- 2. multi-repo support
      -- 3. private repo support
      
      import("xim.base.runtime")
      
      local data_dir = runtime.get_xim_data_dir()
      
      local RepoManager = {}
      RepoManager.__index = RepoManager
      
      function new()
          RepoManager.repos = {
              "https://github.com/d2learn/xim-pkgindex",
          }
          RepoManager.updateSchedule = 30   -- days
          return RepoManager
      end
      
      function RepoManager:sync()
          for _, repo in ipairs(self.repos) do
              print("[xlings: xim]: sync package index repo:", repo)
              local repodir = _to_repodir(repo)
              if os.isdir(repodir) then
                  os.cd(repodir)
                  os.exec("git pull")
              else
                  os.cd(data_dir)
                  os.exec("git clone " .. repo)
              end
          end
      end
      
      function RepoManager:repodirs()
          local dirs = {}
          for _, repo in ipairs(self.repos) do
              local repodir = _to_repodir(repo)
              if not os.isdir(repodir) then
                  os.cd(data_dir)
                  os.exec("git clone " .. repo)
              end
              table.insert(dirs, repodir)
          end
          return dirs
      end
      
      function _to_repodir(repo)
          local dir = string.split(path.filename(repo), ".git")[1]
          local repodir = path.join(data_dir, dir)
          return repodir
      end
      
      function main()
          local repoManager = new()
          repoManager:sync()
          print(repoManager:repodirs())
          print(_to_repodir("my/myrepo"))
      end
      
      1 条回复 最后回复
      0
      • sunrisepeakS 离线
        sunrisepeakS 离线
        sunrisepeak d2learn-dev
        在 回复了 2412322029 最后由 编辑
        #45

        @2412322029 和xim.lua同级目录里有

        1 条回复 最后回复
        0
        • 24123220292 离线
          24123220292 离线
          2412322029
          写于 最后由 编辑
          #46
          > xmake l xim\xim.lua
          Cloning into 'xim-pkgindex'...
          remote: Enumerating objects: 263, done.
          remote: Counting objects: 100% (150/150), done.
          remote: Compressing objects: 100% (99/99), done.
          remote: Total 263 (delta 88), reused 95 (delta 46), pack-reused 113 (from 1)
          Receiving objects: 100% (263/263), 63.15 KiB | 1.04 MiB/s, done.
          Resolving deltas: 100% (118/118), done.
          [xlings:xim]: rebuild index database
          [xlings:xim]: update index database
          
                  XIM - Xlings Installation Manager
          
          xim version: pre-v0.0.2
          
          sunrisepeakS 2 条回复 最后回复
          0
          • sunrisepeakS 离线
            sunrisepeakS 离线
            sunrisepeak d2learn-dev
            在 回复了 2412322029 最后由 编辑
            #47

            @2412322029 很奇怪, 目前还每发现为什么这个会有问题

            24123220292 1 条回复 最后回复
            0
            • sunrisepeakS 离线
              sunrisepeakS 离线
              sunrisepeak d2learn-dev
              在 回复了 2412322029 最后由 编辑
              #48

              @2412322029 这样应该就可以安装使用了。我研究一下为什么这个会在特定环境下报错

              1 条回复 最后回复
              0
              • 24123220292 离线
                24123220292 离线
                2412322029
                在 回复了 sunrisepeak 最后由 编辑
                #49

                @sunrisepeak

                24123@lolik ~
                > xlings
                error: cannot import module: xlings, cannot import module: xim.xim, cannot import module: CmdProcessor, cannot import module: xim.index.IndexManager, 21.055102
                

                对应的文件都有,不知道

                sunrisepeakS 1 条回复 最后回复
                0
                • 24123220292 离线
                  24123220292 离线
                  2412322029
                  写于 最后由 编辑
                  #50

                  我重新运行安装脚本

                  1 条回复 最后回复
                  0
                  • sunrisepeakS 离线
                    sunrisepeakS 离线
                    sunrisepeak d2learn-dev
                    在 回复了 2412322029 最后由 编辑
                    #51

                    @2412322029 就是刚刚哪个地方的问题, 你可以显式指定, 改一下哪个地方的代码 然后执行安装脚本 应该就可以用了。具体原因可能要研究一下

                    1 条回复 最后回复
                    0
                    • 24123220292 离线
                      24123220292 离线
                      2412322029
                      写于 最后由 编辑
                      #52

                      网络问题

                      1 条回复 最后回复
                      0
                      • 24123220292 离线
                        24123220292 离线
                        2412322029
                        写于 最后由 编辑
                        #53

                        proxychains .\tools\install.win.bat 使用代理安装成功了,github测试环境都在国外

                        sunrisepeakS 1 条回复 最后回复
                        0
                        • sunrisepeakS 离线
                          sunrisepeakS 离线
                          sunrisepeak d2learn-dev
                          在 回复了 2412322029 最后由 编辑
                          #54

                          @2412322029 没有修改代码也安装成功了吗

                          24123220292 1 条回复 最后回复
                          0
                          • 24123220292 离线
                            24123220292 离线
                            2412322029
                            在 回复了 sunrisepeak 最后由 编辑
                            #55

                            @sunrisepeak 改了代码运行还是会报错,我重新运行安装脚本一直在下载xvm重试,然后加上代理,就安装成功了,代码没有还原

                            sunrisepeakS 1 条回复 最后回复
                            0
                            • sunrisepeakS 离线
                              sunrisepeakS 离线
                              sunrisepeak d2learn-dev
                              在 回复了 2412322029 最后由 编辑
                              #56

                              @2412322029 如果代码还原 加上代理可以安装成功吗, 按理最新代码如果github用不了会选择gitee

                              1 条回复 最后回复
                              0
                              • 24123220292 离线
                                24123220292 离线
                                2412322029
                                写于 最后由 编辑
                                #57

                                我卸载xlings,重新gitclone,运行proxychains .\tools\install.win.bat,安装成功了,下载xvm,xim 的部分有问题

                                sunrisepeakS 1 条回复 最后回复
                                0
                                • 24123220292 离线
                                  24123220292 离线
                                  2412322029
                                  写于 最后由 编辑
                                  #58
                                  [PID20740] [I] 2025/01/22 15:55:04 <> 127.0.0.1:10808
                                  [PID20740] [I] 2025/01/22 15:55:04 Ws2_32.dll connect(400 127.0.0.1:50647 16) PROXY
                                  [PID20740] [I] 2025/01/22 15:55:05 <> 127.0.0.1:10808
                                  [PID20740] [I] 2025/01/22 15:55:05 Ws2_32.dll connect(400 20.205.243.168:443 16) PROXY
                                  [xlings]: downloading https://github.com/d2learn/xlings/releases/download/xvm-dev/xvm-dev-x86_64-pc-windows-gnu-20250119165726.zip to C:\Users\Public\.xlings_data\xim\xvm-dev-x86_64-pc-windows-gnu-20250119165726.zip
                                  [PID22852] [I] 2025/01/22 15:55:06 <> 127.0.0.1:10808
                                  [PID22852] [I] 2025/01/22 15:55:06 Ws2_32.dll connect(392 127.0.0.1:50652 16) PROXY
                                  [PID22852] [I] 2025/01/22 15:55:06 <> 127.0.0.1:10808
                                  [PID22852] [I] 2025/01/22 15:55:06 Ws2_32.dll connect(392 20.205.243.166:443 16) PROXY
                                  #=#=- #    #                                                                                                           [PID22852] [I] 2025/01/22 15:55:07 <> 127.0.0.1:10808
                                  [PID22852] [I] 2025/01/22 15:55:07 Ws2_32.dll connect(516 127.0.0.1:50658 16) PROXY
                                  -#O=#   #    #                                                                                                         [PID22852] [I] 2025/01/22 15:55:07 <> 127.0.0.1:10808
                                  [PID22852] [I] 2025/01/22 15:55:07 Ws2_32.dll connect(516 185.199.108.133:443 16) PROXY
                                  ################################################################################################################ 100.0%
                                  [xlings:xim]: start extract xvm-dev-x86_64-pc-windows-gnu-20250119165726.zip
                                  [xlings:xim]: start install xvm, it may take some minutes...
                                  
                                  1 条回复 最后回复
                                  0
                                  • sunrisepeakS 离线
                                    sunrisepeakS 离线
                                    sunrisepeak d2learn-dev
                                    在 回复了 2412322029 最后由 编辑
                                    #59

                                    @2412322029 如果加上代理 最新代码安装包括xvm初始化就都没有问题了是吗
                                    不知道是不是 本地开了代理 但是 xlings又识别不到 导致的。按理会选择一个延时低的镜像进行初始化

                                    1 条回复 最后回复
                                    0
                                    • 24123220292 离线
                                      24123220292 离线
                                      2412322029
                                      写于 最后由 编辑
                                      #60

                                      只在下载xlings时使用了gitee,后面下载还是使用的github

                                      sunrisepeakS 1 条回复 最后回复
                                      0
                                      • 24123220292 离线
                                        24123220292 离线
                                        2412322029
                                        写于 最后由 编辑
                                        #61

                                        ping不会走代理,WebRequest有proxy参数,可以测试google之类的

                                        1 条回复 最后回复
                                        0
                                        • 24123220292 离线
                                          24123220292 离线
                                          2412322029
                                          写于 最后由 编辑
                                          #62
                                          > proxychains .\install.win.bat
                                          [xlings]: start detect environment and try to auto config...
                                          [xlings]: xmake installed
                                          [xlings]: xlings is already in PATH.
                                          [PID11076] [I] 2025/01/22 16:06:12 <> 127.0.0.1:10808
                                          [PID11076] [I] 2025/01/22 16:06:12 Ws2_32.dll connect(364 127.0.0.1:61337 16) PROXY
                                          [PID11076] [I] 2025/01/22 16:06:12 <> 127.0.0.1:10808
                                          [PID11076] [I] 2025/01/22 16:06:12 Ws2_32.dll connect(364 20.205.243.166:80 16) PROXY
                                          Latency of URL 'https://github.com/d2learn/xim-pkgindex.git': 712.902ms
                                          [PID14204] [I] 2025/01/22 16:06:13 <> 127.0.0.1:10808
                                          [PID14204] [I] 2025/01/22 16:06:13 Ws2_32.dll connect(324 127.0.0.1:61342 16) PROXY
                                          [PID14204] [I] 2025/01/22 16:06:13 <> 127.0.0.1:10808
                                          [PID14204] [I] 2025/01/22 16:06:13 Ws2_32.dll connect(324 180.76.198.77:80 16) PROXY
                                          Latency of URL 'https://gitee.com/sunrisepeak/xim-pkgindex.git': 322.722ms
                                          [xlings]: set xim default index repo: https://gitee.com/sunrisepeak/xim-pkgindex.git
                                          [xlings]: remove C:/Users/Public/xlings - ok
                                          -> delete local cache data?(y/n)
                                          [W] 2025/01/22 16:06:21 [PX:Ctrl-C]
                                          24123@lolik ~\xlings\tools git:main
                                          > .\install.win.bat
                                          [xlings]: start detect environment and try to auto config...
                                          [xlings]: xmake installed
                                          [xlings]: xlings is already in PATH.
                                          [xlings]: remove C:/Users/Public/xlings - ok
                                          -> delete local cache data?(y/n)
                                          y
                                          [xlings]: remove C:/Users/Public/.xlings_data - ok
                                          [xlings]: xlings uninstalled - ok
                                          [xlings]: install xlings to C:/Users/Public/xlings
                                          [xlings]: create rcachedir C:/Users/Public/.xlings_data
                                          [xlings]: create bindir C:\Users\Public\.xlings_data\bin
                                          [xlings]: copy profile to rcachedir...
                                          [xlings]: copy xlings config file to rcachedir...
                                          [xlings]: config system environment...
                                          error: cannot import module: xlings, cannot import module: xim.xim, cannot import module: CmdProcessor, cannot import module: xim.index.IndexManager, 21.041361
                                          'xvm' 不是内部或外部命令,也不是可运行的程序
                                          
                                          1 条回复 最后回复
                                          0

                                          • 登录

                                          • 没有帐号? 注册

                                          • 登录或注册以进行搜索。
                                          d2learn forums Powered by NodeBB
                                          • 第一个帖子
                                            最后一个帖子
                                          0
                                          • 版块
                                          • 最新
                                          • 标签
                                          • 热门
                                          • Online Tools
                                          • 用户
                                          • 群组