pip

PyCharm venv failed: 'no such option: --build-dir'

假装没事ソ 提交于 2020-12-17 03:04:11
问题 I'm doing a fresh install on a new Windows 10 laptop. I installed Python 3.9 and PyCharm Community 2020.2, then started a new project. In the project settings, I created a new project interpreter in a venv, inside the /venv folder. Everything looks to get set up correctly, but I can't install anything to the project interpreter. When I try to do so, e.g. when I try to install pandas or anything else, I get None-zero exit code (2) with the following message: Usage: D:\MyProject\project\venv

python环境下安装opencv库的方法

自古美人都是妖i 提交于 2020-12-16 23:33:59
注意:安装opencv之前需要先安装numpy,matplotlib等 一、安装方法 方法一、在线安装 1.先安装opencv-python pip install opencv-python --user 我的python版本是3.6.8,可以看到opencv安装的默认版本是 opencv_python-4.1.0.25-cp36-cp36m-win_amd64.whl 2.再安装opencv-contrib-python pip install opencv-contrib-python --user 备注1: 此种方法安装后,import cv2 as cv后,代码可以正常运行,但是无法自动补全 解决方案1:import cv2.cv2 as cv(此方法有时会时灵时不灵) 参考: https://blog.csdn.net/az9996/article/details/90546827 若出现这样的情况: 例如cv.imread()本来是个函数,但是只能补全到cv.imread, 解决方案:修改 project interpreter为别的路径,然后再修改回来; 原因分析:库文件在刚刚被加入项目中时,pycharm会针对这个库文件,构建索引,然后再pycharm底部会显示一个进度条:updating skeletons for ...,在进度条走完之前,代码无法自动补全

TVM使用问题记录

微笑、不失礼 提交于 2020-12-16 12:56:30
1.numpy提示repeat错误 错误信息为 One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version. 使用pip uninstall numpy 多次,一直到提示没有numpy之后,再重新安装numpy 2. AttributeError: module 'attr' has no attribute 's' 错误 明明import attr,也安装了attr包,但一直会报没有's'属性的错误,经查找是安装包错误的问题 卸载attr包,使用 pip install attrs --user 解决 来源: oschina 链接: https://my.oschina.net/u/4297988/blog/3596088

嵌入式工程师入门前后端系列2:搭建web.py环境

杀马特。学长 韩版系。学妹 提交于 2020-12-16 06:19:25
web.py是一个轻量级的web开发框架,作为初学者,我计划先从这个学起来。 https://webpy.org/ 这里是webpy的官方网站。 web.py is a web framework for Python that is as simple as it is powerful. web.py is in the public domain; you can use it for whatever purpose with absolutely no restrictions. 下面先在Windows下搭建web.py环境,网上提供的方法大部分是先把源码包下载下来,然后进入后python setup.py install 安装,但是用这种方法我总是安装失败。原因猜测是我的python版本和web.py版本匹配问题,后来解决方法是:通过pip安装。 在Windows DOS窗口里输入:pip install web.py==0.40 pip如果不识别,需要在环境变量PATH中添加C:/Python27/Scripts 它会提示如下错误信息: 这时输入python -m pip install --upgrade pip 之后再重新输入pip install web.py==0.40 就不再报错了。 安装成功后,进入到目录里执行:python hello.py hello

Cannot use Python's pip on Windows 8. “specified executable is not a valid application for this os platform”

前提是你 提交于 2020-12-16 04:40:18
问题 I seem to be receiving a unique error in Python 2.7.6 on Windows 8 64bit. I was able to install Python perfectly, then was able to install pip using this guide. But when I got to step 3 and I tried to install virtualenv using pip it gave me this error: Program 'pip.exe' failed to run: The specified executable is not a valid application for this OS platform.At line:1 char:1 + pip.exe install virtualenv + ~~~~~~~~~~~~~~~~~~~~~~~~~~. At line:1 char:1 + pip.exe install virtualenv + ~~~~~~~~~~~~~~

Apple M1上如何用pip安装x86的Python Wheel包

亡梦爱人 提交于 2020-12-16 04:29:20
最近可能很多人在犹豫要不要买Apple M1的苹果电脑,担心兼容性问题。其实完全不用担心。Apple M1绝对是强大的生产力工具。这里分享下如何用pip安装x86的Python wheel包。 安装pip Mac自带Python 2.7。如果第一次在terminal中运行Python3,会提示安装。 点击安装之后。就可以运行Python3。 接下来安装pip: curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python3 get-pip.py 安装x86的wheel包 如果你直接用pip去安装包含x86库的Python包,会失败: python3 -m pip install dbr 可能有人会觉得因为M1不兼容。这个时候来看下Python3的arch: % file $(which python3) /usr/bin/python3: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e] /usr/bin/python3 (for architecture x86_64): Mach-O 64-bit

How to install all the dependencies with pip?

允我心安 提交于 2020-12-16 04:04:46
问题 I have a NodeJS API and a Python script. I deployed it on Heroku. The API call runs the python scripts. When I deployed the NodeJS API then type npm install and all works fine but not for python. There is a lot of pip package to install, how can I make this work same as in my local environment? In short, what is the "One command to install them all"? 回答1: You should define your requirements in a requirements.txt file and then pip install -r requirements.txt will install all at the same time.

How to install all the dependencies with pip?

此生再无相见时 提交于 2020-12-16 04:03:50
问题 I have a NodeJS API and a Python script. I deployed it on Heroku. The API call runs the python scripts. When I deployed the NodeJS API then type npm install and all works fine but not for python. There is a lot of pip package to install, how can I make this work same as in my local environment? In short, what is the "One command to install them all"? 回答1: You should define your requirements in a requirements.txt file and then pip install -r requirements.txt will install all at the same time.

Unexpected installation of GIT submodule

强颜欢笑 提交于 2020-12-15 00:44:11
问题 I have such project structure: ├── mypkg │ └── __init__.py ├── setup.py └── submodules └── subm ├── setup.py └── subm └── __init__.py And I need to install submodules/subm so it would be available in the VENV. I try to do it by calling "pip" in a subprocess. So I have such "setup.py" files: mypkg/setup.py : #!/usr/bin/env python import inspect import os import sys import subprocess import setuptools from setuptools.command.install import install from setuptools.command.develop import develop

python+ pycharm 环境安装 + pycharm使用

╄→гoц情女王★ 提交于 2020-12-14 20:40:30
一、下载和安装python 1.可以搜索python官网找到官方链接点击进入 2.也可以用以下链接点击进入:https://www.python.org/ 3.进入python后把鼠标移到downloads上,然后看到下拉选项,点击Windows(因为这里是Windows系统所以选择Windows,你是Mac就选择Mac) 4.这里全是迭代的历史版本号,我们选择最新的版本点击进入 5.进入后一直滑到最底下,根据自己的电脑是32位或者64位进行下载 6.下载完成后开始安装,打开下载好的安装包 ①一定要勾选“Add Python to Path”,要不然要手动添加环境变量 ②点击“Customize installation” 7.然后就一直点击下一步,进入选择安装路径,这里我们最好不要安装在C盘,你开心就好 8.确认python是否安装成功:在cmd中输入“python”指令,出现下图中的提示,说明python安装成功 9.如果在cmd中输入“python”指令后报错,则说明环境变量配置有误,这个时候需要手动配置环境变量 10.首先找到python安装路径,把路径拷贝下来,这里我是把python安装到E盘了,所以我的路径在E盘 11.在弹出的环境变量窗口中,点击系统变量下的Path变量,点击编辑,进入Path页面 12.然后点击新建,把python路径拷贝到里面就完成了 13