-bash:react-native:找不到命令mac

时间:2019-01-20 18:57:13

标签: reactjs react-native

我已按照以下步骤操作,但仍无法创建本机应用程序

对于MacOS

安装自制软件

/ usr / bin / ruby​​ -e“ $(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)” 安装节点

酿造安装节点

安装值班员

酿造守望者

最后安装React Native CLI

npm install -g react-native-cli


/usr/local/Cellar/node/11.7.0/lib
└─┬ react-native-cli@2.0.1
  ├─┬ chalk@1.1.3
  │ ├── ansi-styles@2.2.1
  │ ├── escape-string-regexp@1.0.5
  │ ├─┬ has-ansi@2.0.0
  │ │ └── ansi-regex@2.1.1
  │ ├─┬ strip-ansi@3.0.1
  │ │ └── ansi-regex@2.1.1 deduped
  │ └── supports-color@2.0.0
  ├── minimist@1.2.0
  ├─┬ prompt@0.2.14
  │ ├── pkginfo@0.4.1
  │ ├─┬ read@1.0.7
  │ │ └── mute-stream@0.0.8
  │ ├── revalidator@0.1.8
  │ ├─┬ utile@0.2.1
  │ │ ├── async@0.2.10
  │ │ ├── deep-equal@1.0.1
  │ │ ├── i@0.3.6
  │ │ ├─┬ mkdirp@0.5.1
  │ │ │ └── minimist@0.0.8
  │ │ ├── ncp@0.4.2
  │ │ └─┬ rimraf@2.6.3
  │ │   └─┬ glob@7.1.3
  │ │     ├── fs.realpath@1.0.0
  │ │     ├─┬ inflight@1.0.6
  │ │     │ ├── once@1.4.0 deduped
  │ │     │ └── wrappy@1.0.2
  │ │     ├── inherits@2.0.3
  │ │     ├─┬ minimatch@3.0.4
  │ │     │ └─┬ brace-expansion@1.1.11
  │ │     │   ├── balanced-match@1.0.0
  │ │     │   └── concat-map@0.0.1
  │ │     ├─┬ once@1.4.0
  │ │     │ └── wrappy@1.0.2 deduped
  │ │     └── path-is-absolute@1.0.1
  │ └─┬ winston@0.8.3
  │   ├── async@0.2.10 deduped
  │   ├── colors@0.6.2
  │   ├── cycle@1.0.3
  │   ├── eyes@0.1.8
  │   ├── isstream@0.1.2
  │   ├── pkginfo@0.3.1
  │   └── stack-trace@0.0.10
  └── semver@5.6.0

1 个答案:

答案 0 :(得分:0)

使用正在使用

from bs4 import BeautifulSoup
import requests

url = "https://www.webtoons.com/en/comedy/bluechair/ep-366-husk/viewer?title_no=199&episode_no=538"
headers={
        'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.47 Safari/537.36',
        'Referer' : url
    }

r = requests.get(url, headers = headers)
soup=BeautifulSoup(r.content,'lxml')
imgs=[link['data-url'] for link in soup.select('#_imageList img')]

counter = 0
for img in imgs:
    counter = counter + 1
    filename = 'image' + str(counter) + '.jpg'
    with open(filename, 'wb') as handle:
        response = requests.get(img, stream=True, headers = headers)

        if not response.ok:
            print(response)

        for block in response.iter_content(1024):
            if not block:
                break
            handle.write(block)

创建项目,对吧?

否则,请确保它在您的PATH中。请参阅以下内容:

-bash: react-native: command not found