TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #9 · 7 јан.

Иногда бывает ситуация когда dev-сервер по какой-либо причине не закрылся и висит в процессах, занимая порт. Это может быть из-за падения IDE или просто сам забыл погасить и закрыл терминал. Для таких случаев я набросал простую функцию с командой: kill_on_port() { port=$(lsof -t -i:$1) echo "KILL PROCESS:" $port sudo kill -9 $port } alias killonport="kill_on_port $@" Код поместить в ~/.bashrc и рестартнуть систему. Если во время старта dev-сервера получаете ошибку что порт уже занят, просто выполните команду, подставив свой порт. Bash kill_on_port 8000 Скорее всего бесполезно, если другой процесс назначен на перезапуск вашего dev-сервера в случае падения. Имя команды можете изменить на любое другое. #linux

Hashtags

Резултати

Пронајдени 2 слични објави

Пребарај: #virtualenv

当前筛选 #virtualenv清除筛选
djangoproject

@djangoproject · Post #595 · 17.04.2018 г., 15:51

https://github.com/pypa/virtualenv/issues/1059 Earlier today I installed python3.6 on my debian machine. Python3.6 was made available in buster distribution. When I try to create a virtualenv with python3.6. python3.6 -m venv venv gives the following error. The #virtual_environment was not created successfully because ensurepip is not available. On Debian/Ubuntu systems, you need to install the python3-venv package using the following command. apt-get install python3-venv You may need to use sudo with that command. After installing the python3-venv package, recreate your virtual environment. Failing command: ['/home/float/test/t/bin/python3.6', '-Im', 'ensurepip', '--upgrade', '--default-pip'] I do have python3-venv (3.5.3-1) installed. Why do I get this error? If I run the command py3 -Im ensurepip —upgrade —default-pip it says /usr/bin/python3.6: No module named ensurepip I don't have trouble creating virtualenvs using the default python3 version (3.5.3). Also , I noticed that I can create a virtualenv as follows: #virtualenv -p python3.6 #venv

djangoproject

@djangoproject · Post #535 · 28.12.2017 г., 10:12

https://docs.pipenv.org/ #Pipenv — the officially recommended #Python#packaging tool from Python.org, free (as in freedom). Pipenv is a tool that aims to bring the best of all packaging worlds (#bundler, #composer, #npm, #cargo, #yarn, etc.) to the Python world. #Windows is a first–class citizen, in our world. It automatically creates and manages a #virtualenv for your projects, as well as adds/removes #packages from your #Pipfile as you install/uninstall packages. It also generates the ever–important Pipfile.lock, which is used to produce deterministic builds.