我的Python库是否在目录中的正确位置?

我在使用Python脚本创建独立程序包时遇到问题。我在MacOS中使用的是最新版本的python 3.8.3。当与程序相关的文档出现时,我的python脚本可以通过文件夹中的终端正常运行。

我尝试了Pyinstaller,py2app(在虚拟环境中),现在使用了鸭嘴兽。

在我重试其中之一之前,我只想检查所有文件/ python库是否安装在正确的位置。查看我的图书馆,我所有的文件都在

 
 1. Footer.js

import React from "react";
import SimpleModal1 from "../components/UI/SimpleModal1"
 
 
class footer extends React.Component {
 
constructor (props) {
  super(props);
  this.state = {
    isOpen: true,showModal: false,//requirements for sendgrid form
      email: {
        recipient: '',sender: '',subject: '',text: ''
   
      }  
    }
}
 //function to connect to sendgrid 
  sendEmail = _ => {
    const { email } = this.state;
    fetch(`http://127.0.0.1/:5000/send-email?recipient=${email.recipient}&sender=${email.sender}&topic=${email.subject}&text=${email.text}`) //query string url
      .catch(err => console.error(err)) 
  }
  closeIt(event) {
    this.setState({isOpen:'false'})
  }

  closeBox(event) {
    this.setState({isOpen:false});
    alert("We love you!!! Thanks a bunch!");
}
render() {
 
//sendgrid constants
const {email} = this.state;
const spacer ={
  margin:10
}
const textArea = {
  borderRadius:4
}
  return (
  <footer className="footer">
    <div className="footer__copyright">
     <p>
      Contact Us At [email protected]  
        </p>
    </div>
      <button onClick={(e) => this.setState({isOpen:true})}> OpenDialog</button>
 
<SimpleModal1 isOpen={this.state.isOpen} onClose={(e) => this.setState({isOpen:false})}>
<top>See More Funny Videos....</top>
 
<input
    autoFocus= {true}
    fontSize="20px"
    width= "50%"
    value={email.text}
    onChange={e => this.setState({email:{...email,text: e.target.value}})}
    type="email"
    id="email"
    name="email"
    placeholder="Email Please..."
    required
/>
{/* 
activate 2 functions with one button  Josh*/}
<button onClick={() => {
  this.sendEmail();
  this.closeBox();
}}
 
> SUBSCRIBE!</button>
 
</SimpleModal1>
 
    </div> 
  </footer>
);}
}
export default footer;

//
2.Backend/server/index.js:
const express = require('express');
const cors = require('cors');
const sgMail = require ('@sendgrid/mail');

const app = express();

sgMail.setApiKey('My API Key');
//remove restriction on email by calling cors
app.use(cors());

//Welcome Page
app.get('/',(req,res) => {
    res.send('Welcome to Sendgrid Email Server')
});

app.get('/send-email',res)=> {
    //Get Varaibles from query string
    const {recipient,sender,topic,text } = req.query;

    //SendGrid Requirements
    const msg = {
        to: '[email protected]',from: "[email protected]",subject: "A new email signup! ",text:text,}
    //Send Email,console log the message
    sgMail.send(msg)
    .then((msg) => console.log(text))
})

//setting up email server port and console log message
app.listen(5000,()=> console.log("running on port 5000"));



//
3. Config.js :
module.exports = {
    USER: '[email protected]',PASS: 'Password123!'
}

Library

它们在正确的位置还是应该位于^顶层的Framework文件夹中?

尝试在py2app上打包应用程序的错误消息是:

Library > Frameworks > Python Framework > Versions > 3.8 > lib > python 3.8

Pyinstaller错误为:

2020-08-15 10:18:02.399 FIBA[27366:3763263] CGSTrackingRegionSetIsEnabled returned CG error 268435459

我的问题是:我的扩展名是否存储在正确的位置,Pyinstaller错误消息是否可以解决,谢谢

相关文章

功能概要:(目前已实现功能)公共展示部分:1.网站首页展示...
大体上把Python中的数据类型分为如下几类: Number(数字) ...
开发之前第一步,就是构造整个的项目结构。这就好比作一幅画...
源码编译方式安装Apache首先下载Apache源码压缩包,地址为ht...
前面说完了此项目的创建及数据模型设计的过程。如果未看过,...
python中常用的写爬虫的库有urllib2、requests,对于大多数比...