pip

pip: No module name _internal.main

≯℡__Kan透↙ 提交于 2021-02-10 21:57:43
问题 In Windows, python 2.7, I had pip upgraded, and it showed: Successfully uninstalled pip-8.1.2 Successfully installed pip-19.3.1 But when: pip --version It shows: I tried to 'reverse' to the old version by: pip install pip==8.0.2 It shows the same error. Not sure it's about the python version. How can I correct this problem? Thank you. 回答1: You were right with trying to reinstall pip at an older verion; your installation is broken. I've looked around and the consensus is that you should do:

pip: No module name _internal.main

我只是一个虾纸丫 提交于 2021-02-10 21:55:07
问题 In Windows, python 2.7, I had pip upgraded, and it showed: Successfully uninstalled pip-8.1.2 Successfully installed pip-19.3.1 But when: pip --version It shows: I tried to 'reverse' to the old version by: pip install pip==8.0.2 It shows the same error. Not sure it's about the python version. How can I correct this problem? Thank you. 回答1: You were right with trying to reinstall pip at an older verion; your installation is broken. I've looked around and the consensus is that you should do:

Flask 邮件发送

荒凉一梦 提交于 2021-02-10 18:41:02
今天小婷儿给大家分享的是Flask 邮件发送。 Flask 邮件发送 一、Flask 邮件发送 from flask import Flask, render_template, current_app from flask_script import Manager from flask_mail import Mail, Message from threading import Thread app = Flask(__name__) # 配置邮箱服务器 app.config['MAIL_SERVER'] = 'smtp.163.com' # 邮箱用户 app.config['MAIL_USERNAME'] = ' 邮箱 @163.com' # 用户密码 app.config['MAIL_PASSWORD'] = ' 邮箱密码 ' # 创建Mail对象 mail = Mail(app) def async_send_mail(app, msg): # 邮件发送需要在程序上下文中进行, # 新的线程中没有上下文,需要手动创建 with app.app_context(): mail.send(msg) # 封装函数发送邮件 def send_mail(subject, to, template, **kwargs): # 从代理中获取代理的原始对象 app = current

Install Tensorflow object detection API in Anaconda (Windows)

百般思念 提交于 2021-02-10 18:32:25
This blog is to explain how to install Tensorflow object detection API in Anaconda in Windows 10 as well as how to train train a convolution neural network to do object detection on your own data set. Steps: 1. Installation and Configuration Install Anaconda First we need to install Anaconda on Windows 10. For specific introduction see this link https://medium.com/@GalarnykMichael/install-python-on-windows-anaconda-c63c7c3d1444 After we have installed Anaconda in windows, lets start to install tensorflow Install Tensorflow open an Anaconda Prompt and run the following code C:\>conda create -

How to install Pylint, overcoming errors

柔情痞子 提交于 2021-02-10 17:53:38
问题 I'm taking my first steps into Python, and part of that is getting it all up and running on my MacBook Pro. I'm struggling to get pylint installed, as Visual Studio Code keeps informing me. I am informed that have a linter operational is beneficial, although I couldn't tell you why, but am determined to get things set up right from the start. I am a complete noob when it comes to coding. Please be nice. I've found this link on github, although the responses are somewhat beyond me: https:/

How to install Pylint, overcoming errors

百般思念 提交于 2021-02-10 17:48:40
问题 I'm taking my first steps into Python, and part of that is getting it all up and running on my MacBook Pro. I'm struggling to get pylint installed, as Visual Studio Code keeps informing me. I am informed that have a linter operational is beneficial, although I couldn't tell you why, but am determined to get things set up right from the start. I am a complete noob when it comes to coding. Please be nice. I've found this link on github, although the responses are somewhat beyond me: https:/

Install a python package/module from github in local folder an use it

非 Y 不嫁゛ 提交于 2021-02-10 17:11:05
问题 Issue I would like to install with pip3 a python module from github into a local folder named local_lib/ and then use it in a script, without any virtualenv . Context Here is my folder structure : . +-- local_lib/ // Folder where the package must be installed +-- my_script.py Here is the command line i use to install the path.py package from github into the local_lib/ folder : pip3 install --upgrade --target local_lib git+https://github.com/jaraco/path.py.git Here is the content of the local

Install a python package/module from github in local folder an use it

你。 提交于 2021-02-10 17:10:24
问题 Issue I would like to install with pip3 a python module from github into a local folder named local_lib/ and then use it in a script, without any virtualenv . Context Here is my folder structure : . +-- local_lib/ // Folder where the package must be installed +-- my_script.py Here is the command line i use to install the path.py package from github into the local_lib/ folder : pip3 install --upgrade --target local_lib git+https://github.com/jaraco/path.py.git Here is the content of the local

Install a python package/module from github in local folder an use it

一笑奈何 提交于 2021-02-10 17:05:02
问题 Issue I would like to install with pip3 a python module from github into a local folder named local_lib/ and then use it in a script, without any virtualenv . Context Here is my folder structure : . +-- local_lib/ // Folder where the package must be installed +-- my_script.py Here is the command line i use to install the path.py package from github into the local_lib/ folder : pip3 install --upgrade --target local_lib git+https://github.com/jaraco/path.py.git Here is the content of the local

How to pip install to an external drive?

佐手、 提交于 2021-02-10 14:57:13
问题 I have a USB with a python installation that I carry around with me & use on computers that don't have python installed/don't allow you to install modules. I'd like to install a python package onto it but have been having trouble. Let me use the package rebound-cli for example. If I pip install rebound-cli , the package is installed onto my PC installation of python D:\Program Files (x86)\Python36-32 . The directory of my USB python installation is H:\.bin\Program Files\Python . I've tried