pipenv

pipenv requires python 3.7 but installed version is 3.8 and won't install

≯℡__Kan透↙ 提交于 2020-08-10 18:52:10
问题 I know a litte of Python and more that a year ago I wrote a small script, using pipenv to manage the dependencies. Old platform was Windows 7, current platform is Windows 10. At that time I probably had Pyhton 3.7 installed, not I have 3.8.3 but running: pipenv install Complained that: Warning: Python 3.7 was not found on your system… Neither 'pyenv' nor 'asdf' could be found to install Python. You can specify specific versions of Python with: $ pipenv --python path\to\python This is the

Cannot install local wheel dependency on 3.8 from pipfile made with 3.7

痴心易碎 提交于 2020-08-10 18:52:08
问题 I recently reopened a script I wrote more than one year ago, but failed to install all pipenv dependencies from Pipfile. In particular python_ldap wheel fails (the wheel is in a local folder next to the Pipfile): Pipfile.lock (3d2ab2) out of date, updating to (98503a)… Locking [dev-packages] dependencies… Locking [packages] dependencies… Locking... Resolving dependencies... Success! Updated Pipfile.lock (98503a)! Installing dependencies from Pipfile.lock (98503a)… An error occurred while

centos7中安装python3

半世苍凉 提交于 2020-08-09 22:27:43
1.安装相应的编译工具 在root用户下(不要用普通用户,麻烦),全部复制粘贴过去,一次性安装即可. yum -y groupinstall "Development tools" yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel yum install -y libffi-devel zlib1g-dev yum install zlib* -y 2.下载安装包 wget wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz 3.解压 tar -xvJf Python-3.7.2.tar.xz 4.创建编译安装目录 mkdir /usr/local/python3 5.安装 cd Python-3.7.2 ./configure --prefix=/usr/local/python3 --enable-optimizations --with-ssl #第一个指定安装的路径,不指定的话,安装过程中可能软件所需要的文件复制到其他不同目录,删除软件很不方便

原创Docker部署Django由浅入深系列(上):单容器部署Django + Uwsgi

我们两清 提交于 2020-08-09 18:59:59
Django在生产环境的部署还是比较复杂的, 令很多新手望而生畏, 幸运的是使用Docker容器化技术可以大大简化我们Django在生产环境的部署。 Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移动的镜像中,然后发布到任何流行的 Linux机器上。由于未来使用Docker部署Django是大势所趋且小编对网上Docker部署Django的教程不甚满意(坑比较多), 于是决定自己写篇原创教程由浅入深地总结下Docker部署Django的整个过程。由于本文很长,我们将会分三篇发表于公众号【Python Web与Django开发】,主要内容如下: 上篇:使用docker部署Django + Uwsgi(单容器) 中篇:使用docker部署Django + Uwsgi + Nginx (双容器) 下篇:使用docker-compose部署Django + Uwsgi + Nginx + MySQL + Redis (多容器组合) 注意:本文侧重于Docker技术在部署Django时的应用,而不是Docker基础教程。对Docker命令不熟悉的读者们建议先学习下Docker基础命令。 学前核心知识必读 在正式开始我们的Docker之旅前,我们需要了解4个核心知识点: 在Docker与virtualenv或pipenv的区别

Can't switch python version on Pipenv

元气小坏坏 提交于 2020-08-08 04:13:09
问题 On my MacBook Pro, I have Python 3.6 as default but the project I take over from another requires 2.7, which I have it installed via Anaconda. I set up the Pipenv using pipenv install which setup a version to 3.6. Then I tried to change the version by : pipenv --python 2.7 but it returned this warning: Warning: Your Pipfile requires python_version 3.6, but you are using 2.7.15 (/Users/j/.local/share/v/Z/bin/python). Then of course pipenv check failed, and returned: Specifier python_version

How to use pyinstaller with pipenv / pyenv

試著忘記壹切 提交于 2020-08-02 05:07:15
问题 I am trying to ship an executable from my python script which lives inside a virtual environment using pipenv which again relies on pyenv for python versioning. For that, I want to us pyinstaller. What I did: pipenv install pyinstaller pyinstaller --onefile my_script.py Output: 40 INFO: PyInstaller: 3.5 40 INFO: Python: 3.6.9 41 INFO: Platform: Linux-4.15.0-65-generic-x86_64-with-debian-stretch-sid 42 INFO: wrote /home/matthaeus/cybathlon/planvec/qt_video_gui_example.spec 44 INFO: UPX is not

How to use pyinstaller with pipenv / pyenv

寵の児 提交于 2020-08-02 05:06:27
问题 I am trying to ship an executable from my python script which lives inside a virtual environment using pipenv which again relies on pyenv for python versioning. For that, I want to us pyinstaller. What I did: pipenv install pyinstaller pyinstaller --onefile my_script.py Output: 40 INFO: PyInstaller: 3.5 40 INFO: Python: 3.6.9 41 INFO: Platform: Linux-4.15.0-65-generic-x86_64-with-debian-stretch-sid 42 INFO: wrote /home/matthaeus/cybathlon/planvec/qt_video_gui_example.spec 44 INFO: UPX is not

Python虚拟环境详细教程,一篇带你入坑

笑着哭i 提交于 2020-07-24 06:24:49
Python 之所以强大,除了语言本身的特性外,更重要的是拥有无所不及的第三方库。强大的软件库,让开发者将精力集中在业务上,而避免重复造轮子的浪费。但众多的软件库,形成了复杂的依赖关系。今天我们就来了解下 Python 虚拟环境. 一些概念 Python 虚拟环境,涉及到很多概念和工具,会对使用造成困扰和障碍,所以我们先了解一些概念和与之相关的工具 python 版本 Python 版本指的是 Python 解析器本身的版本。由于 Python3 不能与 Python2 兼容,而且两大阵营之争持续了很长时间,导致一些软件库需要设配两种版本的 Python,同时开发者可能需要在一个环境中,部署不同版本的 Python,对开发和维护造成了麻烦。因此出现了版本管理器 Pyenv,类似于 nodejs 的 nvm,可以创建出相互隔离的 Python 环境,并且可以方便的切换环境中的 Python 版本,但和 Python 虚拟环境关系不大 python 包库 包库或者叫软件源是 Python 第三方软件的库的集合,或者市场,可以发布、下载和管理软件包,其中 pypi (Python Package Index) https://pypi.org/ 是官方指定的软件包库,基于其上的 pip 工具就是从这里查找、下载安装软件包的。为了提高下载速度,世界上有很多 Pypi 的镜像服务器

Pipenv on Windows: 'module' object is not callable

落花浮王杯 提交于 2020-07-23 08:01:28
问题 I'm having trouble using Pipenv on my Windows 10 machine. Initially, I got a timeout error while trying to run pipenv install <module> and following this answer, I disabled Windows Defender. That got rid of the timeout error and it then seems to successfully install the package at ~/.virtualenvs but I get an error when it comes to creating Pipfile.lock : Adding flask to Pipfile's [packages]... Pipfile.lock not found, creating... Locking [dev-packages] dependencies... Locking [packages]

Pipenv on Windows: 'module' object is not callable

帅比萌擦擦* 提交于 2020-07-23 08:00:50
问题 I'm having trouble using Pipenv on my Windows 10 machine. Initially, I got a timeout error while trying to run pipenv install <module> and following this answer, I disabled Windows Defender. That got rid of the timeout error and it then seems to successfully install the package at ~/.virtualenvs but I get an error when it comes to creating Pipfile.lock : Adding flask to Pipfile's [packages]... Pipfile.lock not found, creating... Locking [dev-packages] dependencies... Locking [packages]