virtualenv

pip install matplotlib: “no pkg-config”

老子叫甜甜 提交于 2021-01-21 13:35:09
问题 When I run pip install matplotlib (within a virtualenv), the first lines of output are: Downloading/unpacking matplotlib Running setup.py egg_info for package matplotlib basedirlist is: ['/usr/local/', '/usr', '/usr/X11', '/opt/local'] ============================================================================ BUILDING MATPLOTLIB matplotlib: 1.2.0 python: 2.7.3 (default, Dec 14 2012, 13:31:05) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.6.2

pip install matplotlib: “no pkg-config”

亡梦爱人 提交于 2021-01-21 13:33:14
问题 When I run pip install matplotlib (within a virtualenv), the first lines of output are: Downloading/unpacking matplotlib Running setup.py egg_info for package matplotlib basedirlist is: ['/usr/local/', '/usr', '/usr/X11', '/opt/local'] ============================================================================ BUILDING MATPLOTLIB matplotlib: 1.2.0 python: 2.7.3 (default, Dec 14 2012, 13:31:05) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.6.2

Python set environment variable when creating venv

大兔子大兔子 提交于 2021-01-20 08:04:45
问题 In my project I use the built-in python virtual env ( python -m venv ). To set environment variables I add multiple export VAR1=VALUE1 to the end of the venv/bin/activate . Obviously, when I delete the venv and create a new one, for example with the new python version all my env variables get lost. So, is there a way to preserve them? May be it is possible to define env variables when creating the venv? 回答1: instead of adding to activate export VAR1=VALUE1 consider writing them into their own

How to downgrade python version from 3.8 to 3.7 (mac)

老子叫甜甜 提交于 2021-01-17 04:22:46
问题 I'm using Python & okta-aws tools and in order to fetch correct credentials on aws I need to run okta-aws init. But got an error message of Could not read roles from Okta and the system prompted that "Your Pipfile requires python_version 3.7, but you are using 3.8.3 (/usr/local/Cellar/o/1.1.4/l/.venv/bin/python) . I've tried to search all the Pipfiles on the mac and it seems that the Pipflie under my ~/Pipfile and /usr/local/Cellar/python@3.8/3.8.3_2/libexec/bin/Pipfile all have the same

全球第一免费开源ERP Odoo Ubuntu最佳开发环境独家首发分享

流过昼夜 提交于 2021-01-12 07:27:09
起源 近年来随着国内的互联网经济的快速腾飞,诞生了很多开源软件创造的市场价值以及企业价值神话,特别是对于企业ERP领域,一直以来都是高昂的国内外产品充实,国内的中小成长型企业越来越需要一套好看又能打,死磕性价比的开源替代解决方案用于解决企业的管理与投入并存的信息化难题,从2011年开始由开源智造为代表的最早国内开源软件服务企业为这夙愿贴补国内空白服务领域而扎根至今。也是因为开源智造的不懈努力,才造就了一大批的国内的用户、教学研究者、个人爱好者、从业者纷纷投入全球第一免费开源ERP Odoo的事业中,形成了蓬勃的美好生态前景。 当然发展必然有时代问题,时代问题造就了版本问题,故而国内多数客户分别分布在8、9、10、11、12等多数版本中,虽然国内一些爱好者为了解决这一问题也一直在更新开发环境,但都是以单个版本形式存在,有的也搞出类似的Windows绿色版,但Odoo最佳的开发环境是Ubuntu与MacOS,官方一直推荐以Ubuntu为最优开发环境,以保障开发后的结果能迅速部署在生产环境中。 这时需要有一套基于Ubuntu且能包含Odoo最大的用户群的多版本的开发环境的诉求就此诞生,但去整合和底层优化这套开发环境并不容易,Odoo官方也仅仅是基于Ubuntu原生版本做了个11、12的二合一的开发环境版,缺点是不符合国内的开发人员使用,对开发人员的使用要求过高,无法做到大面积的普及作用

Python里的Flask开发环境的搭建

扶醉桌前 提交于 2021-01-10 17:07:56
在已经安装好了Python后,我这里用的是Python3.5,准备进一步学习Flask框架,下面记录搭建Flask环境 这里使用了虚拟环境,在虚拟环境里,最小化的安装Flask. 参考步骤: 1.首先搭建虚拟环境 已经安装好了virtualenv的库,从dos命令行进入相应文件夹。 我的当前目录是:D:\Work\Python\FlaskProject virtualenv Flask_venv 在当前文件夹下,会生成Flask_venv文件夹 2.启动Flask_venv虚拟环境 .\Flask_venv\scripts\activate 3.安装Flask pip install flask 4.安装和Flask配套使用的jinja2、werkzeug pip install jinja2 pip install werkzeug 安装后用pip list查看 4.编写一个helloworld.py文件,初步测试 1)、代码: # -*-coding:utf8-*- from flask import Flask app = Flask( __name__ ) @app.route( " / " ) def hello(): return " Hello World! " if __name__ == " __main__ " : app.run() 2)、启动:python

测开入门篇《环境管理、编码规范、项目结构》

一曲冷凌霜 提交于 2021-01-07 18:50:37
# 目录 * 一、前提准备 * 二、虚拟环境 * 1.virtualenv的安装和应用 * 2.pipenv的安装和使用 * 3.导出虚拟环境为requirements.txt文件 * 4.pipenv的相关使用命令 * 5.需要在虚拟环境中起项目 * 三、Python代码规范 * 四、工程结构化 `测试平台是做什么的?` 测试开发研发的测试平台**是给点点点的人用的**,可以帮助我们做自动化测试、用例管理、报表生成等,提高测试工作效率。 例如用市面上的postman做的一些测试,不符合公司项目的实际。但是自动化测试平台可以根据公司实际项目需求做定制化开发。 ## 一、前提准备 Python环境:python3.7是python3里面目前最稳定的一个版本,3以上的版本都没有问题。 电脑:Windows10家庭版 ## 二、虚拟环境 Python虚拟环境的主要目的是:为了给不同的工程创建互相独立的运行环境。在虚拟环境下,每一个包,而与其它的工程无关。 不同的虚拟环境中同一个包可以有不同的版本。并且,虚拟环境的数量没有限制,我们可以轻松地用virtualenv或pipenv等工具来创建多个虚拟环境。 ![图片来自网络](https://upload-images.jianshu.io/upload_images/25205170-16d89bb0999f06b5.image

How to move Python virtualenv to different system (computer) and use packages present in Site-packages

拈花ヽ惹草 提交于 2021-01-05 09:12:44
问题 I am making a python 3 application (flask based) and for that I created a virtualenv in my development system, installed all packages via pip and my app worked fine. But when I moved that virtualenv to a different system (python3 installed) and ran my application with the absolute path of my virtualenv python (c:/......./myenv/Scripts/python.exe main.py) then it threw the errors that packages are not installed, I activated the virtualenv and used pip freeze and there were no packages were

VSCode下Python环境搭建

左心房为你撑大大i 提交于 2021-01-05 02:59:37
2018.10.26 更新 新版的vscode 自动推荐 MagicPython --------------- 注 Python 3.3+,自带venv可以用来代替virtualenv. python -m venv <venv_name> vscode并没有项目的概念,点击" 文件->将文件夹添加到工作区",指定工作目录。 vscode的python插件 : Eclipse Keymap (可选. vscode的eclipse键位插件) Python Python Extension pack (这个插件,会装上一堆依赖插件) 将以下内容复制到用户设置 (文件->首选项->设置->用户设置): // 将设置放入此文件中以覆盖默认设置 { //可选 "workbench.colorTheme": "Visual Studio Dark", //可选,git路径 "git.path": "D:/tools/Git/cmd/git.exe", //可选,字体大小 "editor.fontSize": 16, //可选,在文件结尾插入空行 "files.insertFinalNewline": true, //可选,建议关掉。 python代码的规范检查。 "python.linting.enabled": false, //可选,自动激活环境, "python.terminal

Can't run Apache2 with virtualenv

此生再无相见时 提交于 2021-01-04 05:57:32
问题 I'm making a website based on Django, on the server was installed a Python 3.5, but my project requires a Python 3.6. I decided to use virtualenv. I successfuly installed needed version of Python but I can't make it works with Apatche2 using virtualenv . Website is able to run only on Python 2.7, otherwise nothing happens, page is loading for a long time without any error. Here is my VirtualHost config with my try to run on Python 3.6. <VirtualHost *:443> ServerName <site_adress>:443