virtualenv

Can't run Apache2 with virtualenv

人走茶凉 提交于 2021-01-04 05:57:22
问题 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

OpenStack基础知识-tox的详解介绍

感情迁移 提交于 2021-01-03 09:24:29
1、tox简介 tox是通用的虚拟环境管理和测试命令行工具。tox能够让我们在同一个Host上自定义出多套相互独立且隔离的python环境,每套虚拟环境中可能使用了不同的 Python 拦截器/环境变量设置/第三方依赖包。所以 tox 最典型的应用就是用于测试 Python 程序的兼容性了。tox是openstack社区最基本的测试工具,比如python程序的兼容性、UT等。 它的目标是提供最先进的自动化打包、测试和发布功能。 1)作为持续集成服务器的前端,大大减少测试工作所需时间; 2)检查软件包能否在不同的python版本或解释器下正常安装; 3)在不同的环境中运行测试代码。 一般 openstack 项目中的 tox 的功能包含了: 打源码包(sdist)、单元测试(UT)、测试覆盖率(coverage)、代码格式检查(pep8,flake) 等功能. 关键字解释:打源码包(sdist)、单元测试(UT)、测试覆盖率(coverage)、代码格式检查(pep8,flake) 2、使用pip方式安装tox 1)安装pip 安装epel扩展源: yum -y install epel-release 更新完成之后,就可安装pip: yum -y install python-pip 安装完成之后清除cache: yum clean all 2)安装tox $ pip

Default libraries in freshly created Python virtual environment

随声附和 提交于 2020-12-31 23:51:44
问题 I created a new virtual environment using the python virtualenv tool. virtualenv venv I then activated the virtual environment source venv/bin/activate Then I did a pip freeze and this is what I got: (venv)$ pip freeze Flask==0.10.1 Werkzeug==0.9.6 itsdangerous==0.24 lxml==3.4.0 numpy==1.9.1 pdir==0.2.2 virtualenv==1.11.6 wsgiref==0.1.2 I am wondering how so many libraries got installed when I did not even install anything in the virtual environment explicitly. UPDATE 1 : When some of the

Default libraries in freshly created Python virtual environment

耗尽温柔 提交于 2020-12-31 23:49:44
问题 I created a new virtual environment using the python virtualenv tool. virtualenv venv I then activated the virtual environment source venv/bin/activate Then I did a pip freeze and this is what I got: (venv)$ pip freeze Flask==0.10.1 Werkzeug==0.9.6 itsdangerous==0.24 lxml==3.4.0 numpy==1.9.1 pdir==0.2.2 virtualenv==1.11.6 wsgiref==0.1.2 I am wondering how so many libraries got installed when I did not even install anything in the virtual environment explicitly. UPDATE 1 : When some of the

Default libraries in freshly created Python virtual environment

痴心易碎 提交于 2020-12-31 23:35:01
问题 I created a new virtual environment using the python virtualenv tool. virtualenv venv I then activated the virtual environment source venv/bin/activate Then I did a pip freeze and this is what I got: (venv)$ pip freeze Flask==0.10.1 Werkzeug==0.9.6 itsdangerous==0.24 lxml==3.4.0 numpy==1.9.1 pdir==0.2.2 virtualenv==1.11.6 wsgiref==0.1.2 I am wondering how so many libraries got installed when I did not even install anything in the virtual environment explicitly. UPDATE 1 : When some of the

Default libraries in freshly created Python virtual environment

≡放荡痞女 提交于 2020-12-31 23:28:29
问题 I created a new virtual environment using the python virtualenv tool. virtualenv venv I then activated the virtual environment source venv/bin/activate Then I did a pip freeze and this is what I got: (venv)$ pip freeze Flask==0.10.1 Werkzeug==0.9.6 itsdangerous==0.24 lxml==3.4.0 numpy==1.9.1 pdir==0.2.2 virtualenv==1.11.6 wsgiref==0.1.2 I am wondering how so many libraries got installed when I did not even install anything in the virtual environment explicitly. UPDATE 1 : When some of the

How to reset virtualenv and pip?

半世苍凉 提交于 2020-12-30 05:53:23
问题 I installed virtualenv on my Ubuntu 10.04 server. Now when I do pip freeze it shows me the following packages: Django==1.2.4 distribute==0.6.10 python-apt==0.7.94.2ubuntu6.2 virtualenv==1.5.1 wsgiref==0.1.2 When I do "pip uninstall Django" it says: pip uninstall Django Uninstalling Django: Proceed (y/n)? y Successfully uninstalled Django Ideally this should uninstall Django but it doesn't. I can still see the same packages when I do "pip freeze". Now bear with me, the other weird thing is

How to reset virtualenv and pip?

↘锁芯ラ 提交于 2020-12-30 05:51:27
问题 I installed virtualenv on my Ubuntu 10.04 server. Now when I do pip freeze it shows me the following packages: Django==1.2.4 distribute==0.6.10 python-apt==0.7.94.2ubuntu6.2 virtualenv==1.5.1 wsgiref==0.1.2 When I do "pip uninstall Django" it says: pip uninstall Django Uninstalling Django: Proceed (y/n)? y Successfully uninstalled Django Ideally this should uninstall Django but it doesn't. I can still see the same packages when I do "pip freeze". Now bear with me, the other weird thing is

RuntimeError: The current Numpy installation fails to pass a sanity check due to a bug in the windows runtime [duplicate]

心不动则不痛 提交于 2020-12-19 06:53:38
问题 This question already has answers here : How do you fix “runtimeError: package fails to pass a sanity check” for numpy and pandas? (9 answers) Closed last month . I am using Python 3.9 on Windows 10 version 2004 x64. PowerShell as Administrator. Python verion: Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32 Install matplotlib error. pip install virtualenv virtualenv foo cd .\foo .\Scripts\active pip install numpy pip install matplotlib Error

搭建Django开发环境

五迷三道 提交于 2020-12-18 05:07:40
一、前提 准备python虚拟环境,见 win10下virtualenv安装及使用 二、Django的MVT架构 M和Web开发中MVC的M一样,V(View视图函数)对应MVC中的C(Controller控制器),T(Template模板)对应MVC中的V(View视图),Django中也有控制器(Controller),也成为路由。 三、安装Django 这里安装Django2.2版本,要求python版本3.5及以上。 pip install django==2.2 -i https://pypi.tuna.tsinghua.edu.cn/simple/ 安装完成后验证 四、创建Django项目 1.命令行创建 django-admin startproject hello Django项目目录结构如下: hello是项目的包目录;下面的: __init__.py是项目包的标识文件 settings.py是项目的配置文件 urls.py是路由映射表文件 wsgi.py是wsgi接口文件 项目目录下的manage.py是项目管理文件,其实就是Django的启动文件。 启动Django python manage.py runserver Django默认启动在8000端口,浏览器访问,出现如下界面说明启动成功。 2.Pycharm创建Django项目 File-New