Содержание
- Не удается запустить Python REPL в Docker
- Проблема
- Версия
- Причина
- Решение
- My Public Notepad
- Pages
- Friday, 15 January 2021
- Using Python Virtual Environments
- virtualenv
- Databricks Knowledge Base
- Python REPL fails to start in Docker
- Problem
- Version
- Cause
- Solution
- Additional Informations
- Related Articles
- Related Articles
- Databricks Knowledge Base
- Python REPL fails to start in Docker
- Problem
- Version
- Cause
- Solution
- Additional Informations
- Related Articles
- Related Articles
- Emacs: `jedi:install-server` не работает, хотя установлен `virtualenv`
- 3 ответа
Не удается запустить Python REPL в Docker
Проблема
При использовании контейнера Docker, содержащего предварительно созданные библиотеки Python, команды Python завершаются сбоем, а виртуальное окружение не создается. В журналах драйвера отображается указанное ниже сообщение об ошибке.
Чтобы проверить возникновение этой ошибки, выполните в записной книжке следующую команду:
Появляется сообщение об ошибке примерно следующего содержания:
Команда virtualenv не распознает параметр —no-site-packages .
Версия
Проблема затрагивает все текущие версии Databricks Runtime, за исключением версий Databricks Runtime, включающих Conda. Она затрагивает библиотеку virtualenv версии 20.0.0 и выше.
Причина
Эта проблема вызвана тем, что в контейнере Docker используется версия библиотеки virtualenv Python, которая не поддерживает этот параметр —no-site-packages .
Для Databricks Runtime требуется библиотека virtualenv , поддерживающая параметр —no-site-packages . Этот параметр был удален в библиотеке virtualenv версии 20.0.0 и выше.
Чтобы проверить версию библиотеки virtualenv , выполните в записной книжке следующую команду:
Решение
Проблему можно устранить, указав совместимую версию при установке библиотеки virtualenv .
Например, параметр virtualenv==16.0.0 в Dockerfile устанавливает библиотеку virtualenv версии 16.0.0. Эта версия библиотеки поддерживает необходимый параметр.
Источник
My Public Notepad
Bits and bobs about computers and programming
Pages
Friday, 15 January 2021
Using Python Virtual Environments
- virtualenv
- virtualenvwrapper
- Conda (part of Anaconda)
virtualenv
$ sudo apt update
$ sudo apt install python3-dev python3-pip
$ sudo pip3 install -U virtualenv # system-wide install
$ python3 —version
$ pip3 —version
$ virtualenv —version
$ virtualenv —system-site-packages -p python3 ./ venv_dir_name
We can also use a dot command:
When virtual environment is active, your shell prompt is prefixed with its name in form: (venv) .
How to rename virtual environment?
From inside active virtual environment:
$ pip freeze > requirements.txt
$ deactivate
pip freeze shows packages YOU installed via pip (or pipenv if using that tool) command in a requirements format.
. and create a new one with correct name:
$ python3 -m virtualenv -p python3
/python-envs/tensorrt-5.1.5.1-tensorflow-1.15.0
Already using interpreter /usr/bin/python3
Using base prefix ‘/usr’
New python executable in /home/nvidia/python-envs/tensorrt-5.1.5.1-tensorflow-1.15.0/bin/python3
Also creating executable in /home/nvidia/python-envs/tensorrt-5.1.5.1-tensorflow-1.15.0/bin/python
Installing setuptools, pkg_resources, pip, wheel. done.
Источник
Databricks Knowledge Base
If you still have questions or prefer to get help directly from an agent, please submit a request. We’ll get back to you as soon as possible.
Python REPL fails to start in Docker
Learn how to fix a Python virtualenv error that prevents REPL from starting in a Docker container
Last published at: May 19th, 2022
Problem
When you use a Docker container that includes prebuilt Python libraries, Python commands fail and the virtual environment is not created. The following error message is visible in the driver logs.
You can confirm the issue by running the following command in a notebook:
The result is an error message similar to the following:
The virtualenv command does not recognize the —no-site-packages option.
Version
The problem affects all current Databricks Runtime versions, except for Databricks Runtime versions that include Conda. It affects virtualenv library version 20.0.0 and above.
Cause
This issue is caused by using a Python virtualenv library version in the Docker container that does not support the —no-site-packages option.
Databricks Runtime requires a virtualenv library that supports the —no-site-packages option . This option was removed in virtualenv library version 20.0.0 and above.
You can verify your virtualenv library version by running the following command in a notebook:
Solution
You can resolve the issue by specifying a compatible version when you install the virtualenv library.
For example, setting virtualenv==16.0.0 in the Dockerfile installs virtualenv library version 16.0.0. This version of the library supports the required option.
Additional Informations
Related Articles
Problem The cluster returns Cancelled in a Python notebook. Inspect the driver lo.
Conda is a popular open source package management system for the Anaconda repo. D.
Problem The cluster returns Cancelled in a Python notebook. Notebooks in all othe.
Problem You have an Apache Spark job that is triggered correctly, but remains idl.
Related Articles
Problem The cluster returns Cancelled in a Python notebook. Inspect the driver lo.
Conda is a popular open source package management system for the Anaconda repo. D.
Problem The cluster returns Cancelled in a Python notebook. Notebooks in all othe.
Problem You have an Apache Spark job that is triggered correctly, but remains idl.
© Databricks 2022-2023. All rights reserved. Apache, Apache Spark, Spark, and the Spark logo are trademarks of the Apache Software Foundation.
Источник
Databricks Knowledge Base
If you still have questions or prefer to get help directly from an agent, please submit a request. We’ll get back to you as soon as possible.
Python REPL fails to start in Docker
Learn how to fix a Python virtualenv error that prevents REPL from starting in a Docker container
Last published at: May 19th, 2022
Problem
When you use a Docker container that includes prebuilt Python libraries, Python commands fail and the virtual environment is not created. The following error message is visible in the driver logs.
You can confirm the issue by running the following command in a notebook:
The result is an error message similar to the following:
The virtualenv command does not recognize the —no-site-packages option.
Version
The problem affects all current Databricks Runtime versions, except for Databricks Runtime versions that include Conda. It affects virtualenv library version 20.0.0 and above.
Cause
This issue is caused by using a Python virtualenv library version in the Docker container that does not support the —no-site-packages option.
Databricks Runtime requires a virtualenv library that supports the —no-site-packages option . This option was removed in virtualenv library version 20.0.0 and above.
You can verify your virtualenv library version by running the following command in a notebook:
Solution
You can resolve the issue by specifying a compatible version when you install the virtualenv library.
For example, setting virtualenv==16.0.0 in the Dockerfile installs virtualenv library version 16.0.0. This version of the library supports the required option.
Additional Informations
Related Articles
Problem The cluster returns Cancelled in a Python notebook. Inspect the driver lo.
Conda is a popular open source package management system for the Anaconda repo. D.
Problem The cluster returns Cancelled in a Python notebook. Notebooks in all othe.
Problem You have an Apache Spark job that is triggered correctly, but remains idl.
Related Articles
Problem The cluster returns Cancelled in a Python notebook. Inspect the driver lo.
Conda is a popular open source package management system for the Anaconda repo. D.
Problem The cluster returns Cancelled in a Python notebook. Notebooks in all othe.
Problem You have an Apache Spark job that is triggered correctly, but remains idl.
© Databricks 2022-2023. All rights reserved. Apache, Apache Spark, Spark, and the Spark logo are trademarks of the Apache Software Foundation.
Источник
Emacs: `jedi:install-server` не работает, хотя установлен `virtualenv`
Я пытаюсь установить автодополнение JEDI для Emacs в соответствии с этим руководством.
Когда я ввожу M-x jedi:install-server , я получаю сообщение об ошибке Program named «virtualenv» does not exist . Я последовал совету в этом ответе и установил его, используя pip install virtualenv . Теперь, когда я ввожу virtualenv в терминал, я получаю следующий вывод:
Затем я перезапустился, ввел M-x jedi:install-server , но все равно получаю ту же ошибку.
Я использую GNU Emacs 26.3 (сборка 1, x86_64-pc-linux-gnu, версия GTK+ 3.22.30) от 3 декабря 2019 г. на Linux Mint 19.3 Tricia.
Как я могу исправить эту ошибку и начать использовать автозаполнение JEDI?
Обновление 1. Кроме того, всякий раз, когда я открываю файл Python, я получаю это предупреждение.
3 ответа
У меня похожая проблема, я тоже использую Linux Mint Tricia. Я хочу использовать company-jedi вместо jedi-ac
В моем случае я хотел, чтобы jedi и emacs использовали python3.8. Итак, я хочу jedi virtualenv на основе python3.8.
Jedi virtualenv создается с помощью пакета emacs-python-enviroment.
Моя проблема, похоже, связана с тем, что emacs-python-enviroment по умолчанию использует параметр —system-site-package, поэтому у меня много ошибок, так как система python3 — это python3.6, и я не (и я не хочу), чтобы все необходимые пакеты были установлены в общесистемном python3.
Я решил проблему, добавив опцию ‘—no-site-package’ (см. эту ) в среду emacs-python
Emacs-python-enviroment используется для создания jedi virtualenv с именем ‘default’ и расположенным в `
/.emacs.d/.python-enviroments/’, вы можете настроить другое имя и местоположение этого виртуального окружения, если хотите (для дополнительную информацию см. в это)
Это моя рабочая конфигурация. Вы можете указать другой python вместо python3.8 (тот, который я использую)
Я больше не использую jedi и переключился на lsp-mode , но ниже моя старая рабочая конфигурация с использованием company-jedi для завершения Python. Когда загружается python-mode , он вызывает jedi:install-server-block для установки поддержки джедая, если она не была установлена. Вы можете проверить буфер *Messages* , чтобы увидеть, выводит ли он Installing jedi server. . Надеюсь, это поможет.
Таким образом добавьте «аргументы сервера», показанные выше в предупреждении, в файл .emacs.
Источник
Different Python projects depend on different packages. To keep them separated and avoid polluting the global space with package installations we can use the concept of virtual environments. There are several ways to work with virtual environments in Python:
- virtualenv
- virtualenvwrapper
- Conda (part of Anaconda)
virtualenv
To use virtualenv we first need to install all necessary components:
$ sudo apt update
$ sudo apt install python3-dev python3-pip
$ sudo pip3 install -U virtualenv # system-wide install
Verification:
$ python3 —version
$ pip3 —version
$ virtualenv —version
or
$ virtualenv
usage: virtualenv [—version] [—with-traceback] [-v | -q] [—read-only-app-data] [—app-data APP_DATA] [—reset-app-data] [—upgrade-embed-wheels] [—discovery {builtin}] [-p py] [—try-first-with py_exe]
[—creator {builtin,cpython3-posix,venv}] [—seeder {app-data,pip}] [—no-seed] [—activators comma_sep_list] [—clear] [—no-vcs-ignore] [—system-site-packages] [—symlinks | —copies] [—no-download | —download]
[—extra-search-dir d [d …]] [—pip version] [—setuptools version] [—wheel version] [—no-pip] [—no-setuptools] [—no-wheel] [—no-periodic-update] [—symlink-app-data] [—prompt prompt] [-h]
dest
virtualenv: error: the following arguments are required: dest
SystemExit: 2
or
$ virtualenv —help
usage: virtualenv [—version] [—with-traceback] [-v | -q] [—read-only-app-data] [—app-data APP_DATA] [—reset-app-data] [—upgrade-embed-wheels] [—discovery {builtin}] [-p py] [—try-first-with py_exe]
[—creator {builtin,cpython3-posix,venv}] [—seeder {app-data,pip}] [—no-seed] [—activators comma_sep_list] [—clear] [—no-vcs-ignore] [—system-site-packages] [—symlinks | —copies] [—no-download | —download]
[—extra-search-dir d [d …]] [—pip version] [—setuptools version] [—wheel version] [—no-pip] [—no-setuptools] [—no-wheel] [—no-periodic-update] [—symlink-app-data] [—prompt prompt] [-h]
dest
optional arguments:
—version display the version of the virtualenv package and its location, then exit
—with-traceback on failure also display the stacktrace internals of virtualenv (default: False)
—read-only-app-data use app data folder in read-only mode (write operations will fail with error) (default: False)
—app-data APP_DATA a data folder used as cache by the virtualenv (default: /home/bojan/.local/share/virtualenv)
—reset-app-data start with empty app data folder (default: False)
—upgrade-embed-wheels trigger a manual update of the embedded wheels (default: False)
-h, —help show this help message and exit
verbosity:
verbosity = verbose — quiet, default INFO, mapping => CRITICAL=0, ERROR=1, WARNING=2, INFO=3, DEBUG=4, NOTSET=5
-v, —verbose increase verbosity (default: 2)
-q, —quiet decrease verbosity (default: 0)
discovery:
discover and provide a target interpreter
—discovery {builtin} interpreter discovery method (default: builtin)
-p py, —python py interpreter based on what to create environment (path/identifier) — by default use the interpreter where the tool is installed — first found wins (default: [])
—try-first-with py_exe try first these interpreters before starting the discovery (default: [])
creator:
options for creator builtin
—creator {builtin,cpython3-posix,venv}
create environment via (builtin = cpython3-posix) (default: builtin)
dest directory to create virtualenv at
—clear remove the destination directory if exist before starting (will overwrite files otherwise) (default: False)
—no-vcs-ignore don’t create VCS ignore directive in the destination directory (default: False)
—system-site-packages give the virtual environment access to the system site-packages dir (default: False)
—symlinks try to use symlinks rather than copies, when symlinks are not the default for the platform (default: True)
—copies, —always-copy try to use copies rather than symlinks, even when symlinks are the default for the platform (default: False)
seeder:
options for seeder app-data
—seeder {app-data,pip} seed packages install method (default: app-data)
—no-seed, —without-pip do not install seed packages (default: False)
—no-download, —never-download
pass to disable download of the latest pip/setuptools/wheel from PyPI (default: True)
—download pass to enable download of the latest pip/setuptools/wheel from PyPI (default: False)
—extra-search-dir d [d …] a path containing wheels to extend the internal wheel list (can be set 1+ times) (default: [])
—pip version version of pip to install as seed: embed, bundle or exact version (default: bundle)
—setuptools version version of setuptools to install as seed: embed, bundle or exact version (default: bundle)
—wheel version version of wheel to install as seed: embed, bundle or exact version (default: bundle)
—no-pip do not install pip (default: False)
—no-setuptools do not install setuptools (default: False)
—no-wheel do not install wheel (default: False)
—no-periodic-update disable the periodic (once every 14 days) update of the embedded wheels (default: False)
—symlink-app-data symlink the python packages from the app-data folder (requires seed pip>=19.3) (default: False)
activators:
options for activation scripts
—activators comma_sep_list activators to generate — default is all supported (default: bash,cshell,fish,powershell,python,xonsh)
—prompt prompt provides an alternative prompt prefix for this environment (default: None)
config file /home/bojan/.config/virtualenv/virtualenv.ini missing (change via env var VIRTUALENV_CONFIG_FILE)
Create virtual environment (we chose to use python3 as Python interpreter and venv as the directory where to store virtual environment):
$ virtualenv -p python3 ./venv_dir_name
or
$ virtualenv —system-site-packages -p python3 ./venv_dir_name
If you build with virtualenv —system-site-packages ENV, your virtual environment will inherit packages from /usr/lib/python2.7/site-packages (or wherever your global site-packages directory is).
This can be used if you have control over the global site-packages directory, and you want to depend on the packages there. If you want isolation from the global system, do not use this flag. BK: This flag should be avoided as it defeats the entire point of virtualenvs (which is why —no-site-packages was made the default).
Example:
$ virtualenv -p python3 ./venv
created virtual environment CPython3.8.5.final.0-64 in 253ms
creator CPython3Posix(dest=/home/bojan/dev/github/python-demo/venv, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/bojan/.local/share/virtualenv)
added seed packages: pip==20.3.3, setuptools==51.1.2, wheel==0.36.2
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
I once experienced this error when tried to create a virtual environment:
$ virtualenv -p python3 ./venv
Traceback (most recent call last):
File «/usr/local/bin/virtualenv», line 5, in <module>
from virtualenv.__main__ import run_with_catch
File «/usr/local/lib/python3.8/dist-packages/virtualenv/__init__.py», line 3, in <module>
from .run import cli_run, session_via_cli
File «/usr/local/lib/python3.8/dist-packages/virtualenv/run/__init__.py», line 6, in <module>
from ..app_data import make_app_data
File «/usr/local/lib/python3.8/dist-packages/virtualenv/app_data/__init__.py», line 9, in <module>
from appdirs import user_data_dir
ModuleNotFoundError: No module named ‘appdirs’
I then installed the missing module via pip but this showed another error:
$ sudo pip3 install appdirs
Collecting appdirs
Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
ERROR: virtualenv 20.3.1 requires filelock<4,>=3.0.0, which is not installed.
Installing collected packages: appdirs
Successfully installed appdirs-1.4.4
I resolved this by reinstalling the virtualenv:
$ sudo pip3 install virtualenv
Requirement already satisfied: virtualenv in /usr/local/lib/python3.8/dist-packages (20.3.1)
Requirement already satisfied: appdirs<2,>=1.4.3 in /usr/local/lib/python3.8/dist-packages (from virtualenv) (1.4.4)
Requirement already satisfied: six<2,>=1.9.0 in /usr/lib/python3/dist-packages (from virtualenv) (1.14.0)
Requirement already satisfied: distlib<1,>=0.3.1 in /usr/local/lib/python3.8/dist-packages (from virtualenv) (0.3.1)
Collecting filelock<4,>=3.0.0
Downloading filelock-3.0.12-py3-none-any.whl (7.6 kB)
Installing collected packages: filelock
Successfully installed filelock-3.0.12
Once virtual environment is created, we’ll have venv/bin/activate script created. Let’s explore it:
$ cat venv/bin/activate
…
deactivate() {
…
}
…
VIRTUAL_ENV=»/home/bojan/dev/github/tensorflow-demo/venv»
export VIRTUAL_ENV
_OLD_VIRTUAL_PATH=»$PATH»
PATH=»$VIRTUAL_ENV/bin:$PATH»
export PATH
…
pydoc () {
python -m pydoc «$@»
}
…
We can see that we’ll now have a new environment variable set — VIRTUAL_ENV and also a deactivate commmand.
To activate virtual environment:
$ source ./venv/bin/activate
We can also use a dot command:
$ . ./venv/bin/activate
When virtual environment is active, your shell prompt is prefixed with its name in form: (venv).
(venv) $ which pip
/home/bojan/dev/github/python-demo/venv/bin/pip
(venv) $ which pip3
/home/bojan/dev/github/python-demo/venv/bin/pip3
$ pip install -r requirements.txt
$ pip3 install -r requirements.txt
It is possible to install a single new package in the virtual environment:
$ pip install package_name
Example:
(venv) $ pip3 install psycopg2
Collecting psycopg2
Using cached psycopg2-2.8.6-cp38-cp38-linux_x86_64.whl
Installing collected packages: psycopg2
Successfully installed psycopg2-2.8.6
To verify installation path:
(venv) $ pip3 show psycopg2
Name: psycopg2
Version: 2.8.6
Summary: psycopg2 — Python-PostgreSQL Database Adapter
Home-page: https://psycopg.org/
Author: Federico Di Gregorio
Author-email: fog@initd.org
License: LGPL with exceptions
Location: /home/user/dev/my-app/venv/lib/python3.8/site-packages
Requires:
Required-by:
To check the version of the package installed in virtual environment:
(venv) $ pip3 list | grep psycopg
psycopg2 2.8.6
To exit virtual environment:
(venv) $ deactivate
How to rename virtual environment?
directory — How to rename a virtualenv in Python? — Stack Overflow
From inside active virtual environment:
$ pip freeze > requirements.txt
$ deactivate
From python — Pip freeze vs. pip list — Stack Overflow:
pip list shows ALL packages.
pip freeze shows packages YOU installed via pip (or pipenv if using that tool) command in a requirements format.
Also, be aware of `$ pip freeze > requirements.txt` considered harmful.
Then delete old environment directory. E.g.
$ rm -r ~/python-envs/tensorrt-5.1.5.1-tensorflow-1.14.0/
…and create a new one with correct name:
$ python3 -m virtualenv -p python3 ~/python-envs/tensorrt-5.1.5.1-tensorflow-1.15.0
Already using interpreter /usr/bin/python3
Using base prefix ‘/usr’
New python executable in /home/nvidia/python-envs/tensorrt-5.1.5.1-tensorflow-1.15.0/bin/python3
Also creating executable in /home/nvidia/python-envs/tensorrt-5.1.5.1-tensorflow-1.15.0/bin/python
Installing setuptools, pkg_resources, pip, wheel…done.
Activate it and install all packages from the saved list:
$ source ~/python-envs/tensorrt-5.1.5.1-tensorflow-1.15.0/bin/activate
$ pip install -r requirements.txt
$ pip3 install —extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v43 tensorflow-gpu==1.15.0+nv19.12
virtualenvwrapper
TBD…
Conda
References
PS C:UsersKRISHDesktopven.tut> ls
PS C:UsersKRISHDesktopven.tut> pyhton
pyhton : The term ‘pyhton’ is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ pyhton
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (pyhton:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:UsersKRISHDesktopven.tut> pyhton
pyhton : The term ‘pyhton’ is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ pyhton
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (pyhton:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:UsersKRISHDesktopven.tut> python
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type «help», «copyright», «credits» or «license» for more information.
>>> exit
Use exit() or Ctrl-Z plus Return to exit
>>> exit()
PS C:UsersKRISHDesktopven.tut> pip
Usage:
pip <command> [options]
Commands:
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
config Manage local and global configuration.
search Search PyPI for packages.
cache Inspect and manage pip’s wheel cache.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
debug Show information useful for debugging.
help Show help for commands.
General Options:
-h, —help Show help.
—isolated Run pip in an isolated mode, ignoring environment variables and user configuration.
-v, —verbose Give more output. Option is additive, and can be used up to 3 times.
-V, —version Show version and exit.
-q, —quiet Give less output. Option is additive, and can be used up to 3 times (corresponding to
WARNING, ERROR, and CRITICAL logging levels).
—log <path> Path to a verbose appending log.
—no-input Disable prompting for input.
—proxy <proxy> Specify a proxy in the form [user:passwd@]proxy.server:port.
—retries <retries> Maximum number of retries each connection should attempt (default 5 times).
—timeout <sec> Set the socket timeout (default 15 seconds).
—exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup,
(a)bort.
—trusted-host <hostname> Mark this host or host:port pair as trusted, even though it does not have valid or any
HTTPS.
—cert <path> Path to alternate CA bundle.
—client-cert <path> Path to SSL client certificate, a single file containing the private key and the
certificate in PEM format.
—cache-dir <dir> Store the cache data in <dir>.
—no-cache-dir Disable the cache.
—disable-pip-version-check
Don’t periodically check PyPI to determine whether a new version of pip is available for
download. Implied with —no-index.
—no-color Suppress colored output
—no-python-version-warning
Silence deprecation warnings for upcoming unsupported Pythons.
—use-feature <feature> Enable new functionality, that may be backward incompatible.
—use-deprecated <feature> Enable deprecated functionality, that will be removed in the future.
PS C:UsersKRISHDesktopven.tut> pip install virtualenv
Collecting virtualenv
Downloading virtualenv-20.1.0-py2.py3-none-any.whl (4.9 MB)
|████████████████████████████████| 4.9 MB 364 kB/s
Collecting distlib<1,>=0.3.1
Downloading distlib-0.3.1-py2.py3-none-any.whl (335 kB)
|████████████████████████████████| 335 kB 469 kB/s
Requirement already satisfied: six<2,>=1.9.0 in c:python39libsite-packages (from virtualenv) (1.15.0)
Collecting filelock<4,>=3.0.0
Downloading filelock-3.0.12-py3-none-any.whl (7.6 kB)
Requirement already satisfied: appdirs<2,>=1.4.3 in c:python39libsite-packages (from virtualenv) (1.4.4)
Installing collected packages: distlib, filelock, virtualenv
Successfully installed distlib-0.3.1 filelock-3.0.12 virtualenv-20.1.0
PS C:UsersKRISHDesktopven.tut> virtualenv
usage: virtualenv [—version] [—with-traceback] [-v | -q] [—app-data APP_DATA] [—reset-app-data] [—upgrade-embed-wheels] [—discovery {builtin}] [-p py] [—creator {builtin,cpython3-win,venv}] [—seeder {app-data,pip}] [—no-seed]
[—activators comma_sep_list] [—clear] [—system-site-packages] [—copies] [—no-download | —download] [—extra-search-dir d [d …]] [—pip version] [—setuptools version] [—wheel version] [—no-pip] [—no-setuptools]
[—no-wheel] [—no-periodic-update] [—symlink-app-data] [—prompt prompt] [-h]
dest
virtualenv: error: the following arguments are required: dest
SystemExit: 2
PS C:UsersKRISHDesktopven.tut> virtualenv
usage: virtualenv [—version] [—with-traceback] [-v | -q] [—app-data APP_DATA] [—reset-app-data] [—upgrade-embed-wheels] [—discovery {builtin}] [-p py] [—creator {builtin,cpython3-win,venv}] [—seeder {app-data,pip}] [—no-seed]
[—activators comma_sep_list] [—clear] [—system-site-packages] [—copies] [—no-download | —download] [—extra-search-dir d [d …]] [—pip version] [—setuptools version] [—wheel version] [—no-pip] [—no-setuptools]
[—no-wheel] [—no-periodic-update] [—symlink-app-data] [—prompt prompt] [-h]
dest
virtualenv: error: the following arguments are required: dest
SystemExit: 2
PS C:UsersKRISHDesktopven.tut> pip install dest
ERROR: Could not find a version that satisfies the requirement dest (from versions: none)
ERROR: No matching distribution found for dest
PS C:UsersKRISHDesktopven.tut> virtualenx dest
virtualenx : The term ‘virtualenx’ is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1
+ virtualenx dest
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (virtualenx:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:UsersKRISHDesktopven.tut> virtualenv
usage: virtualenv [—version] [—with-traceback] [-v | -q] [—app-data APP_DATA] [—reset-app-data] [—upgrade-embed-wheels] [—discovery {builtin}] [-p py] [—creator {builtin,cpython3-win,venv}] [—seeder {app-data,pip}] [—no-seed]
[—activators comma_sep_list] [—clear] [—system-site-packages] [—copies] [—no-download | —download] [—extra-search-dir d [d …]] [—pip version] [—setuptools version] [—wheel version] [—no-pip] [—no-setuptools]
[—no-wheel] [—no-periodic-update] [—symlink-app-data] [—prompt prompt] [-h]
dest
virtualenv: error: the following arguments are required: dest
SystemExit: 2
PS C:UsersKRISHDesktopven.tut> virtualenv
usage: virtualenv [—version] [—with-traceback] [-v | -q] [—app-data APP_DATA] [—reset-app-data] [—upgrade-embed-wheels] [—discovery {builtin}] [-p py] [—creator {builtin,cpython3-win,venv}] [—seeder {app-data,pip}] [—no-seed]
[—activators comma_sep_list] [—clear] [—system-site-packages] [—copies] [—no-download | —download] [—extra-search-dir d [d …]] [—pip version] [—setuptools version] [—wheel version] [—no-pip] [—no-setuptools]
[—no-wheel] [—no-periodic-update] [—symlink-app-data] [—prompt prompt] [-h]
dest
virtualenv: error: the following arguments are required: dest
SystemExit: 2
PS C:UsersKRISHDesktopven.tut> virtualenv
usage: virtualenv [—version] [—with-traceback] [-v | -q] [—app-data APP_DATA] [—reset-app-data] [—upgrade-embed-wheels] [—discovery {builtin}] [-p py] [—creator {builtin,cpython3-win,venv}] [—seeder {app-data,pip}] [—no-seed]
[—activators comma_sep_list] [—clear] [—system-site-packages] [—copies] [—no-download | —download] [—extra-search-dir d [d …]] [—pip version] [—setuptools version] [—wheel version] [—no-pip] [—no-setuptools]
[—no-wheel] [—no-periodic-update] [—symlink-app-data] [—prompt prompt] [-h]
dest
virtualenv: error: the following arguments are required: dest
SystemExit: 2
PS C:UsersKRISHDesktopven.tut> pip install virtualenv
Requirement already satisfied: virtualenv in c:python39libsite-packages (20.1.0)
Requirement already satisfied: filelock<4,>=3.0.0 in c:python39libsite-packages (from virtualenv) (3.0.12)
Requirement already satisfied: appdirs<2,>=1.4.3 in c:python39libsite-packages (from virtualenv) (1.4.4)
Requirement already satisfied: six<2,>=1.9.0 in c:python39libsite-packages (from virtualenv) (1.15.0)
Requirement already satisfied: distlib<1,>=0.3.1 in c:python39libsite-packages (from virtualenv) (0.3.1)
PS C:UsersKRISHDesktopven.tut> virualenv
virualenv : The term ‘virualenv’ is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1
+ virualenv
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (virualenv:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:UsersKRISHDesktopven.tut> virtualenv
usage: virtualenv [—version] [—with-traceback] [-v | -q] [—app-data APP_DATA] [—reset-app-data] [—upgrade-embed-wheels] [—discovery {builtin}] [-p py] [—creator {builtin,cpython3-win,venv}] [—seeder {app-data,pip}] [—no-seed]
[—activators comma_sep_list] [—clear] [—system-site-packages] [—copies] [—no-download | —download] [—extra-search-dir d [d …]] [—pip version] [—setuptools version] [—wheel version] [—no-pip] [—no-setuptools]
[—no-wheel] [—no-periodic-update] [—symlink-app-data] [—prompt prompt] [-h]
dest
virtualenv: error: the following arguments are required: dest
SystemExit: 2
PS C:UsersKRISHDesktopven.tut> dest
dest : The term ‘dest’ is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
+ dest
+ ~~~~
+ CategoryInfo : ObjectNotFound: (dest:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:UsersKRISHDesktopven.tut> dest virtualenv
dest : The term ‘dest’ is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
+ dest virtualenv
+ ~~~~
+ CategoryInfo : ObjectNotFound: (dest:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:UsersKRISHDesktopven.tut> virtualenv
usage: virtualenv [—version] [—with-traceback] [-v | -q] [—app-data APP_DATA] [—reset-app-data] [—upgrade-embed-wheels] [—discovery {builtin}] [-p py] [—creator {builtin,cpython3-win,venv}] [—seeder {app-data,pip}] [—no-seed]
[—activators comma_sep_list] [—clear] [—system-site-packages] [—copies] [—no-download | —download] [—extra-search-dir d [d …]] [—pip version] [—setuptools version] [—wheel version] [—no-pip] [—no-setuptools]
[—no-wheel] [—no-periodic-update] [—symlink-app-data] [—prompt prompt] [-h]
dest
virtualenv: error: the following arguments are required: dest
SystemExit: 2
PS C:UsersKRISHDesktopven.tut> virtualenv krish
created virtual environment CPython3.9.0.final.0-64 in 15450ms
creator CPython3Windows(dest=C:UsersKRISHDesktopven.tutkrish, clear=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:UsersKRISHAppDataLocalpypavirtualenv)
added seed packages: pip==20.2.4, setuptools==50.3.2, wheel==0.35.1
activators BashActivator,BatchActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
PS C:UsersKRISHDesktopven.tut> kri
kri : The term ‘kri’ is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:2
+ kri
+ ~~~
+ CategoryInfo : ObjectNotFound: (kri:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:UsersKRISHDesktopven.tut> krishScriptsactivate
(krish) PS C:UsersKRISHDesktopven.tut> set executionpolicy remotesigned
(krish) PS C:UsersKRISHDesktopven.tut> Set-ExecutionPolicy remotesigned
Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy
might expose you to the security risks described in the about_Execution_Policies help topic at
https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is «N»): Y
Set-ExecutionPolicy : Access to the registry key
‘HKEY_LOCAL_MACHINESOFTWAREMicrosoftPowerShell1ShellIdsMicrosoft.PowerShell’ is denied. To change
the execution policy for the default (LocalMachine) scope, start Windows PowerShell with the «Run as
administrator» option. To change the execution policy for the current user, run «Set-ExecutionPolicy
-Scope CurrentUser».
At line:1 char:1
+ Set-ExecutionPolicy remotesigned
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (:) [Set-ExecutionPolicy], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetExecut
ionPolicyCommand
(krish) PS C:UsersKRISHDesktopven.tut> python
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type «help», «copyright», «credits» or «license» for more information.
>>> import flask
Traceback (most recent call last):
File «<stdin>», line 1, in <module>
ModuleNotFoundError: No module named ‘flask’
>>> deactivate
Traceback (most recent call last):
File «<stdin>», line 1, in <module>
NameError: name ‘deactivate’ is not defined
>>> krishScriptsdeactivate
File «<stdin>», line 1
SyntaxError: unexpected character after line continuation character
>>> krishScriptsactivate
File «<stdin>», line 1
SyntaxError: unexpected character after line continuation character
>>> exit()
(krish) PS C:UsersKRISHDesktopven.tut> krishScriptsactivate
(krish) PS C:UsersKRISHDesktopven.tut> deactivate
PS C:UsersKRISHDesktopven.tut> python
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type «help», «copyright», «credits» or «license» for more information.
>>> import pandas
>>> exit()
PS C:UsersKRISHDesktopven.tut> krishScriptsactivate
(krish) PS C:UsersKRISHDesktopven.tut> import pandas
import : The term ‘import’ is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
+ import pandas
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (import:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
(krish) PS C:UsersKRISHDesktopven.tut> python
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type «help», «copyright», «credits» or «license» for more information.
>>> import pandas
Traceback (most recent call last):
File «<stdin>», line 1, in <module>
ModuleNotFoundError: No module named ‘pandas’
>>> exit()
(krish) PS C:UsersKRISHDesktopven.tut> pip install sklearn
Collecting sklearn
Downloading sklearn-0.0.tar.gz (1.1 kB)
Collecting scikit-learn
Downloading scikit-learn-0.23.2.tar.gz (7.2 MB)
|████████████████████████████████| 7.2 MB 312 kB/s
Installing build dependencies … error
ERROR: Command errored out with exit status 2:
command: ‘C:UsersKRISHDesktopven.tutkrishScriptspython.exe’ ‘C:UsersKRISHDesktopven.tutkrishlibsite-packagespip’ install —ignore-installed —no-user —prefix ‘C:UsersKRISHAppDataLocalTemppip-build-env-fwqk5_h6overlay’ —no-warn-script-location —no-binary :none: —only-binary :none: -i https://pypi.org/simple — setuptools wheel ‘Cython>=0.28.5’ ‘numpy==1.13.3; python_version=='»‘»‘3.6′»‘»‘ and platform_system!='»‘»‘AIX'»‘»‘ and platform_python_implementation == ‘»‘»‘CPython'»‘»» ‘numpy==1.14.0; python_version=='»‘»‘3.6′»‘»‘ and platform_system!='»‘»‘AIX'»‘»‘ and platform_python_implementation != ‘»‘»‘CPython'»‘»» ‘numpy==1.14.5; python_version=='»‘»‘3.7′»‘»‘ and platform_system!='»‘»‘AIX'»‘»» ‘numpy==1.17.3; python_version>='»‘»‘3.8′»‘»‘ and platform_system!='»‘»‘AIX'»‘»» ‘numpy==1.16.0; python_version=='»‘»‘3.6′»‘»‘ and platform_system=='»‘»‘AIX'»‘»» ‘numpy==1.16.0; python_version=='»‘»‘3.7′»‘»‘ and platform_system=='»‘»‘AIX'»‘»» ‘numpy==1.17.3; python_version>='»‘»‘3.8′»‘»‘ and platform_system=='»‘»‘AIX'»‘»» ‘scipy>=0.19.1’
cwd: None
Complete output (72 lines):
Ignoring numpy: markers ‘python_version == «3.6» and platform_system != «AIX» and platform_python_implementation == «CPython»‘ don’t match your environment
Ignoring numpy: markers ‘python_version == «3.6» and platform_system != «AIX» and platform_python_implementation != «CPython»‘ don’t match your environment
Ignoring numpy: markers ‘python_version == «3.7» and platform_system != «AIX»‘ don’t match your environment
Ignoring numpy: markers ‘python_version == «3.6» and platform_system == «AIX»‘ don’t match your environment
Ignoring numpy: markers ‘python_version == «3.7» and platform_system == «AIX»‘ don’t match your environment
Ignoring numpy: markers ‘python_version >= «3.8» and platform_system == «AIX»‘ don’t match your environment
Collecting setuptools
Downloading setuptools-50.3.2-py3-none-any.whl (785 kB)
Collecting wheel
Downloading wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Collecting Cython>=0.28.5
Downloading Cython-0.29.21-py2.py3-none-any.whl (974 kB)
Collecting numpy==1.17.3
Downloading numpy-1.17.3.zip (6.4 MB)
Collecting scipy>=0.19.1
Downloading scipy-1.5.4-cp39-cp39-win_amd64.whl (31.4 MB)
ERROR: Exception:
Traceback (most recent call last):
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_vendorurllib3response.py», line 437, in _error_catcher
yield
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_vendorurllib3response.py», line 519, in read
data = self._fp.read(amt) if not fp_closed else b»»
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_vendorcachecontrolfilewrapper.py», line 62, in read
data = self.__fp.read(amt)
File «c:python39libhttpclient.py», line 458, in read
n = self.readinto(b)
File «c:python39libhttpclient.py», line 502, in readinto
n = self.fp.readinto(b)
File «c:python39libsocket.py», line 704, in readinto
return self._sock.recv_into(b)
File «c:python39libssl.py», line 1241, in recv_into
return self.read(nbytes, buffer)
File «c:python39libssl.py», line 1099, in read
return self._sslobj.read(len, buffer)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internalclibase_command.py», line 228, in _main
status = self.run(options, args)
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internalclireq_command.py», line 182, in wrapper
return func(self, options, args)
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internalcommandsinstall.py», line 323, in run
requirement_set = resolver.resolve(
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internalresolutionlegacyresolver.py», line 183, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internalresolutionlegacyresolver.py», line 388, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internalresolutionlegacyresolver.py», line 340, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internaloperationsprepare.py», line 467, in prepare_linked_requirement
local_file = unpack_url(
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internaloperationsprepare.py», line 255, in unpack_url
file = get_http_url(
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internaloperationsprepare.py», line 129, in get_http_url
from_path, content_type = _download_http_url(
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internaloperationsprepare.py», line 282, in _download_http_url
for chunk in download.chunks:
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internalcliprogress_bars.py», line 168, in iter
for x in it:
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internalnetworkutils.py», line 64, in response_chunks
for chunk in response.raw.stream(
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_vendorurllib3response.py», line 576, in stream
data = self.read(amt=amt, decode_content=decode_content)
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_vendorurllib3response.py», line 541, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File «c:python39libcontextlib.py», line 135, in __exit__
self.gen.throw(type, value, traceback)
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_vendorurllib3response.py», line 455, in _error_catcher
raise ProtocolError(«Connection broken: %r» % e, e)
pip._vendor.urllib3.exceptions.ProtocolError: («Connection broken: ConnectionResetError(10054, ‘An existing connection was forcibly closed by the remote host’, None, 10054, None)», ConnectionResetError(10054, ‘An existing connection was forcibly closed by the remote host’, None, 10054, None))
—————————————-
ERROR: Command errored out with exit status 2: ‘C:UsersKRISHDesktopven.tutkrishScriptspython.exe’ ‘C:UsersKRISHDesktopven.tutkrishlibsite-packagespip’ install —ignore-installed —no-user —prefix ‘C:UsersKRISHAppDataLocalTemppip-build-env-fwqk5_h6overlay’ —no-warn-script-location —no-binary :none: —only-binary :none: -i https://pypi.org/simple — setuptools wheel ‘Cython>=0.28.5’ ‘numpy==1.13.3; python_version=='»‘»‘3.6′»‘»‘ and platform_system!='»‘»‘AIX'»‘»‘ and platform_python_implementation == ‘»‘»‘CPython'»‘»» ‘numpy==1.14.0; python_version=='»‘»‘3.6′»‘»‘ and platform_system!='»‘»‘AIX'»‘»‘ and platform_python_implementation != ‘»‘»‘CPython'»‘»» ‘numpy==1.14.5; python_version=='»‘»‘3.7′»‘»‘ and platform_system!='»‘»‘AIX'»‘»» ‘numpy==1.17.3; python_version>='»‘»‘3.8′»‘»‘ and platform_system!='»‘»‘AIX'»‘»» ‘numpy==1.16.0; python_version=='»‘»‘3.6′»‘»‘ and platform_system=='»‘»‘AIX'»‘»» ‘numpy==1.16.0; python_version=='»‘»‘3.7′»‘»‘ and platform_system=='»‘»‘AIX'»‘»» ‘numpy==1.17.3; python_version>='»‘»‘3.8′»‘»‘ and platform_system=='»‘»‘AIX'»‘»» ‘scipy>=0.19.1’ Check the logs for full command output.
(krish) PS C:UsersKRISHDesktopven.tut> dd
dd : The term ‘dd’ is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
+ dd
+ ~~
+ CategoryInfo : ObjectNotFound: (dd:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut>
(krish) PS C:UsersKRISHDesktopven.tut> pip install sklearn
Collecting sklearn
Using cached sklearn-0.0.tar.gz (1.1 kB)
Collecting scikit-learn
Using cached scikit-learn-0.23.2.tar.gz (7.2 MB)
Installing build dependencies … error
ERROR: Command errored out with exit status 2:
command: ‘C:UsersKRISHDesktopven.tutkrishScriptspython.exe’ ‘C:UsersKRISHDesktopven.tutkrishlibsite-packagespip’ install —ignore-installed —no-user —prefix ‘C:UsersKRISHAppDataLocalTemppip-build-env-ikx0t4qsoverlay’ —no-warn-script-location —no-binary :none: —only-binary :none: -i https://pypi.org/simple — setuptools wheel ‘Cython>=0.28.5’ ‘numpy==1.13.3; python_version=='»‘»‘3.6′»‘»‘ and platform_system!='»‘»‘AIX'»‘»‘ and platform_python_implementation == ‘»‘»‘CPython'»‘»» ‘numpy==1.14.0; python_version=='»‘»‘3.6′»‘»‘ and platform_system!='»‘»‘AIX'»‘»‘ and platform_python_implementation != ‘»‘»‘CPython'»‘»» ‘numpy==1.14.5; python_version=='»‘»‘3.7′»‘»‘ and platform_system!='»‘»‘AIX'»‘»» ‘numpy==1.17.3; python_version>='»‘»‘3.8′»‘»‘ and platform_system!='»‘»‘AIX'»‘»» ‘numpy==1.16.0; python_version=='»‘»‘3.6′»‘»‘ and platform_system=='»‘»‘AIX'»‘»» ‘numpy==1.16.0; python_version=='»‘»‘3.7′»‘»‘ and platform_system=='»‘»‘AIX'»‘»» ‘numpy==1.17.3; python_version>='»‘»‘3.8′»‘»‘ and platform_system=='»‘»‘AIX'»‘»» ‘scipy>=0.19.1’
cwd: None
Complete output (72 lines):
Ignoring numpy: markers ‘python_version == «3.6» and platform_system != «AIX» and platform_python_implementation == «CPython»‘ don’t match your environment
Ignoring numpy: markers ‘python_version == «3.6» and platform_system != «AIX» and platform_python_implementation != «CPython»‘ don’t match your environment
Ignoring numpy: markers ‘python_version == «3.7» and platform_system != «AIX»‘ don’t match your environment
Ignoring numpy: markers ‘python_version == «3.6» and platform_system == «AIX»‘ don’t match your environment
Ignoring numpy: markers ‘python_version == «3.7» and platform_system == «AIX»‘ don’t match your environment
Ignoring numpy: markers ‘python_version >= «3.8» and platform_system == «AIX»‘ don’t match your environment
Collecting setuptools
Using cached setuptools-50.3.2-py3-none-any.whl (785 kB)
Collecting wheel
Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Collecting Cython>=0.28.5
Using cached Cython-0.29.21-py2.py3-none-any.whl (974 kB)
Collecting numpy==1.17.3
Using cached numpy-1.17.3.zip (6.4 MB)
Collecting scipy>=0.19.1
Downloading scipy-1.5.4-cp39-cp39-win_amd64.whl (31.4 MB)
ERROR: Exception:
Traceback (most recent call last):
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_vendorurllib3response.py», line 437, in _error_catcher
yield
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_vendorurllib3response.py», line 519, in read
data = self._fp.read(amt) if not fp_closed else b»»
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_vendorcachecontrolfilewrapper.py», line 62, in read
data = self.__fp.read(amt)
File «c:python39libhttpclient.py», line 458, in read
n = self.readinto(b)
File «c:python39libhttpclient.py», line 502, in readinto
n = self.fp.readinto(b)
File «c:python39libsocket.py», line 704, in readinto
return self._sock.recv_into(b)
File «c:python39libssl.py», line 1241, in recv_into
return self.read(nbytes, buffer)
File «c:python39libssl.py», line 1099, in read
return self._sslobj.read(len, buffer)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internalclibase_command.py», line 228, in _main
status = self.run(options, args)
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internalclireq_command.py», line 182, in wrapper
return func(self, options, args)
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internalcommandsinstall.py», line 323, in run
requirement_set = resolver.resolve(
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internalresolutionlegacyresolver.py», line 183, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internalresolutionlegacyresolver.py», line 388, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internalresolutionlegacyresolver.py», line 340, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internaloperationsprepare.py», line 467, in prepare_linked_requirement
local_file = unpack_url(
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internaloperationsprepare.py», line 255, in unpack_url
file = get_http_url(
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internaloperationsprepare.py», line 129, in get_http_url
from_path, content_type = _download_http_url(
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internaloperationsprepare.py», line 282, in _download_http_url
for chunk in download.chunks:
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internalcliprogress_bars.py», line 168, in iter
for x in it:
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_internalnetworkutils.py», line 64, in response_chunks
for chunk in response.raw.stream(
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_vendorurllib3response.py», line 576, in stream
data = self.read(amt=amt, decode_content=decode_content)
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_vendorurllib3response.py», line 541, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File «c:python39libcontextlib.py», line 135, in __exit__
self.gen.throw(type, value, traceback)
File «C:UsersKRISHDesktopven.tutkrishlibsite-packagespip_vendorurllib3response.py», line 455, in _error_catcher
raise ProtocolError(«Connection broken: %r» % e, e)
pip._vendor.urllib3.exceptions.ProtocolError: («Connection broken: ConnectionResetError(10054, ‘An existing connection was forcibly closed by the remote host’, None, 10054, None)», ConnectionResetError(10054, ‘An existing connection was forcibly closed by the remote host’, None, 10054, None))
—————————————-
ERROR: Command errored out with exit status 2: ‘C:UsersKRISHDesktopven.tutkrishScriptspython.exe’ ‘C:UsersKRISHDesktopven.tutkrishlibsite-packagespip’ install —ignore-installed —no-user —prefix ‘C:UsersKRISHAppDataLocalTemppip-build-env-ikx0t4qsoverlay’ —no-warn-script-location —no-binary :none: —only-binary :none: -i https://pypi.org/simple — setuptools wheel ‘Cython>=0.28.5’ ‘numpy==1.13.3; python_version=='»‘»‘3.6′»‘»‘ and platform_system!='»‘»‘AIX'»‘»‘ and platform_python_implementation == ‘»‘»‘CPython'»‘»» ‘numpy==1.14.0; python_version=='»‘»‘3.6′»‘»‘ and platform_system!='»‘»‘AIX'»‘»‘ and platform_python_implementation != ‘»‘»‘CPython'»‘»» ‘numpy==1.14.5; python_version=='»‘»‘3.7′»‘»‘ and platform_system!='»‘»‘AIX'»‘»» ‘numpy==1.17.3; python_version>='»‘»‘3.8′»‘»‘ and platform_system!='»‘»‘AIX'»‘»» ‘numpy==1.16.0; python_version=='»‘»‘3.6′»‘»‘ and platform_system=='»‘»‘AIX'»‘»» ‘numpy==1.16.0; python_version=='»‘»‘3.7′»‘»‘ and platform_system=='»‘»‘AIX'»‘»» ‘numpy==1.17.3; python_version>='»‘»‘3.8′»‘»‘ and platform_system=='»‘»‘AIX'»‘»» ‘scipy>=0.19.1’ Check the logs for full command output.
(krish) PS C:UsersKRISHDesktopven.tut> pip freeze > requirements.txt
(krish) PS C:UsersKRISHDesktopven.tut> pip install flask
Collecting flask
Using cached Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Collecting itsdangerous>=0.24
Using cached itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting click>=5.1
Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting Jinja2>=2.10.1
Using cached Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
Collecting Werkzeug>=0.15
Using cached Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
Collecting MarkupSafe>=0.23
Using cached MarkupSafe-1.1.1.tar.gz (19 kB)
Building wheels for collected packages: MarkupSafe
Building wheel for MarkupSafe (setup.py) … done
Created wheel for MarkupSafe: filename=MarkupSafe-1.1.1-py3-none-any.whl size=12633 sha256=4ea8fffbe74dd1390309a18761725bb24f4c0718a7eb4999e1c28c3d7ccaf856
Stored in directory: c:userskrishappdatalocalpipcachewheelse0196f6ba857621f50dc08e084312746ed3ebc14211ba30037d5e44e
Successfully built MarkupSafe
Installing collected packages: itsdangerous, click, MarkupSafe, Jinja2, Werkzeug, flask
Successfully installed Jinja2-2.11.2 MarkupSafe-1.1.1 Werkzeug-1.0.1 click-7.1.2 flask-1.1.2 itsdangerous-1.1.0
(krish) PS C:UsersKRISHDesktopven.tut> pip freeze > requirements.txt
(krish) PS C:UsersKRISHDesktopven.tut> pip install -r .requirements.txt
Requirement already satisfied: click==7.1.2 in c:userskrishdesktopven.tutkrishlibsite-packages (from -r .requirements.txt (line 1)) (7.1.2)
Requirement already satisfied: Flask==1.1.2 in c:userskrishdesktopven.tutkrishlibsite-packages (from -r .requirements.txt (line 2)) (1.1.2)
Requirement already satisfied: itsdangerous==1.1.0 in c:userskrishdesktopven.tutkrishlibsite-packages (from -r .requirements.txt (line 3)) (1.1.0)
Requirement already satisfied: Jinja2==2.11.2 in c:userskrishdesktopven.tutkrishlibsite-packages (from -r .requirements.txt (line 4)) (2.11.2)
Requirement already satisfied: MarkupSafe==1.1.1 in c:userskrishdesktopven.tutkrishlibsite-packages (from -r .requirements.txt (line 5)) (1.1.1)
Requirement already satisfied: Werkzeug==1.0.1 in c:userskrishdesktopven.tutkrishlibsite-packages (from -r .requirements.txt (line 6)) (1.0.1)
(krish) PS C:UsersKRISHDesktopven.tut> deactivate
PS C:UsersKRISHDesktopven.tut> virtualenv —system-site-packages krish2
created virtual environment CPython3.9.0.final.0-64 in 1410ms
creator CPython3Windows(dest=C:UsersKRISHDesktopven.tutkrish2, clear=False, global=True)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:UsersKRISHAppDataLocalpypavirtualenv)
added seed packages: pip==20.2.4, setuptools==50.3.2, wheel==0.35.1
activators BashActivator,BatchActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
PS C:UsersKRISHDesktopven.tut> krish2Scriptsactivate
(krish2) PS C:UsersKRISHDesktopven.tut> pyhton
pyhton : The term ‘pyhton’ is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
+ pyhton
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (pyhton:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
(krish2) PS C:UsersKRISHDesktopven.tut> python
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type «help», «copyright», «credits» or «license» for more information.
>>> import flask
>>> exit()
(krish2) PS C:UsersKRISHDesktopven.tut> pyhton
pyhton : The term ‘pyhton’ is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
+ pyhton
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (pyhton:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
(krish2) PS C:UsersKRISHDesktopven.tut> python
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type «help», «copyright», «credits» or «license» for more information.
>>> import pandas
>>> exit()
(krish2) PS C:UsersKRISHDesktopven.tut> python
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type «help», «copyright», «credits» or «license» for more information.
>>> exit()
(krish2) PS C:UsersKRISHDesktopven.tut> pip freeze > requirements2.txt
(krish2) PS C:UsersKRISHDesktopven.tut> python
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type «help», «copyright», «credits» or «license» for more information.
>>> print(«hello world»)
hello world
>>> def function2
File «<stdin>», line 1
def function2
^
SyntaxError: invalid syntax
>>> def function1():
… print(«you are in function»)
File «<stdin>», line 2
print(«you are in function»)
^
IndentationError: expected an indented block
>>> import random
>>> random_number = random.randint(0, 1)
>>> print(random_number)
1
>>> rand = random.random() * 10
>>> print(rand)
8.980228261385639
>>> exit()
(krish2) PS C:UsersKRISHDesktopven.tut> python
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type «help», «copyright», «credits» or «license» for more information.
>>> import math
>>> print(math.sqrt(225))
15.0
>>> print(math.sqrt(755555))
869.2266677915491
>>> exit()
(krish2) PS C:UsersKRISHDesktopven.tut> python
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type «help», «copyright», «credits» or «license» for more information.
>>> a = int(input(«please add number of rows of stars you want to print»))
please add number of rows of stars you want to print
Traceback (most recent call last):
File «<stdin>», line 1, in <module>
ValueError: invalid literal for int() with base 10: »
>>> import pandas
>>> exit()
(krish2) PS C:UsersKRISHDesktopven.tut> pyhton
pyhton : The term ‘pyhton’ is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
+ pyhton
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (pyhton:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
(krish2) PS C:UsersKRISHDesktopven.tut> python
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type «help», «copyright», «credits» or «license» for more information.
>>> print(math.sqrt(755555))
Traceback (most recent call last):
File «<stdin>», line 1, in <module>
NameError: name ‘math’ is not defined
>>> import math
>>> print(cos(765))
Traceback (most recent call last):
File «<stdin>», line 1, in <module>
NameError: name ‘cos’ is not defined
>>> exit()
(krish2) PS C:UsersKRISHDesktopven.tut> pyhton
pyhton : The term ‘pyhton’ is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
+ pyhton
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (pyhton:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
(krish2) PS C:UsersKRISHDesktopven.tut>
(krish2) PS C:UsersKRISHDesktopven.tut>
(krish2) PS C:UsersKRISHDesktopven.tut>
(krish2) PS C:UsersKRISHDesktopven.tut>
(krish2) PS C:UsersKRISHDesktopven.tut>
(krish2) PS C:UsersKRISHDesktopven.tut>
(krish2) PS C:UsersKRISHDesktopven.tut> python
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type «help», «copyright», «credits» or «license» for more information.
>>> print(99 + 199)
298
>>> print(«you are in function»)
you are in function
>>>