I ran the following to upgrade Ansible (I'm on 2.8.4):
s-MacBook-Pro:~ albertski$ sudo pip install ansible --upgrade
Password:
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
WARNING: The directory '/Users/albertski/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/Users/albertski/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting ansible
Downloading https://files.pythonhosted.org/packages/04/25/48fee5f8048360d9375e01846fcf395dda58242ed1f25a2106b6794452eb/ansible-2.8.5.tar.gz (14.4MB)
|████████████████████████████████| 14.4MB 14.7MB/s
Requirement already satisfied, skipping upgrade: jinja2 in /Library/Python/2.7/site-packages (from ansible) (2.10)
Requirement already satisfied, skipping upgrade: PyYAML in /Library/Python/2.7/site-packages (from ansible) (3.13)
Requirement already satisfied, skipping upgrade: cryptography in /Library/Python/2.7/site-packages (from ansible) (2.4.2)
Requirement already satisfied, skipping upgrade: MarkupSafe>=0.23 in /Library/Python/2.7/site-packages (from jinja2->ansible) (1.1.0)
Requirement already satisfied, skipping upgrade: six>=1.4.1 in /Library/Python/2.7/site-packages (from cryptography->ansible) (1.11.0)
Requirement already satisfied, skipping upgrade: cffi!=1.11.3,>=1.7 in /Library/Python/2.7/site-packages (from cryptography->ansible) (1.11.5)
Requirement already satisfied, skipping upgrade: enum34; python_version < "3" in /Library/Python/2.7/site-packages (from cryptography->ansible) (1.1.6)
Requirement already satisfied, skipping upgrade: idna>=2.1 in /Library/Python/2.7/site-packages (from cryptography->ansible) (2.7)
Requirement already satisfied, skipping upgrade: asn1crypto>=0.21.0 in /Library/Python/2.7/site-packages (from cryptography->ansible) (0.24.0)
Requirement already satisfied, skipping upgrade: ipaddress; python_version < "3" in /Library/Python/2.7/site-packages (from cryptography->ansible) (1.0.22)
Requirement already satisfied, skipping upgrade: pycparser in /Library/Python/2.7/site-packages (from cffi!=1.11.3,>=1.7->cryptography->ansible) (2.19)
Installing collected packages: ansible
Found existing installation: ansible 2.7.13
Uninstalling ansible-2.7.13:
Successfully uninstalled ansible-2.7.13
Running setup.py install for ansible ... done
Successfully installed ansible-2.8.5
It shows at the end Successfully installed ansible-2.8.5.
When I check the version it still shows 2.8.4.
Alberts-MacBook-Pro:~ albertski$ ansible --version
ansible 2.8.4
config file = /Users/albertski/.ansible.cfg
configured module search path = ['/Users/albertski/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible
executable location = /Library/Frameworks/Python.framework/Versions/3.7/bin/ansible
python version = 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 03:13:28) [Clang 6.0 (clang-600.0.57)]
Edit
Tried to downgrade to 2.7.13 and I ran into the same issue:
sudo pip install ansible==2.7.13
Password:
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
WARNING: The directory '/Users/albertski/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/Users/albertski/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting ansible==2.7.13
Downloading https://files.pythonhosted.org/packages/71/25/90546592a692fcb8b3e6e578e743dcba19f1ecdb2ef47860dc5bf0a828aa/ansible-2.7.13.tar.gz (11.9MB)
|████████████████████████████████| 11.9MB 7.7MB/s
Requirement already satisfied: jinja2 in /Library/Python/2.7/site-packages (from ansible==2.7.13) (2.10)
Requirement already satisfied: PyYAML in /Library/Python/2.7/site-packages (from ansible==2.7.13) (3.13)
Requirement already satisfied: paramiko in /Library/Python/2.7/site-packages (from ansible==2.7.13) (2.4.2)
Requirement already satisfied: cryptography in /Library/Python/2.7/site-packages (from ansible==2.7.13) (2.4.2)
Requirement already satisfied: setuptools in /Library/Python/2.7/site-packages (from ansible==2.7.13) (40.6.2)
Requirement already satisfied: MarkupSafe>=0.23 in /Library/Python/2.7/site-packages (from jinja2->ansible==2.7.13) (1.1.0)
Requirement already satisfied: pyasn1>=0.1.7 in /Library/Python/2.7/site-packages (from paramiko->ansible==2.7.13) (0.4.4)
Requirement already satisfied: bcrypt>=3.1.3 in /Library/Python/2.7/site-packages (from paramiko->ansible==2.7.13) (3.1.4)
Requirement already satisfied: pynacl>=1.0.1 in /Library/Python/2.7/site-packages (from paramiko->ansible==2.7.13) (1.3.0)
Requirement already satisfied: six>=1.4.1 in /Library/Python/2.7/site-packages (from cryptography->ansible==2.7.13) (1.11.0)
Requirement already satisfied: cffi!=1.11.3,>=1.7 in /Library/Python/2.7/site-packages (from cryptography->ansible==2.7.13) (1.11.5)
Requirement already satisfied: enum34; python_version < "3" in /Library/Python/2.7/site-packages (from cryptography->ansible==2.7.13) (1.1.6)
Requirement already satisfied: idna>=2.1 in /Library/Python/2.7/site-packages (from cryptography->ansible==2.7.13) (2.7)
Requirement already satisfied: asn1crypto>=0.21.0 in /Library/Python/2.7/site-packages (from cryptography->ansible==2.7.13) (0.24.0)
Requirement already satisfied: ipaddress; python_version < "3" in /Library/Python/2.7/site-packages (from cryptography->ansible==2.7.13) (1.0.22)
Requirement already satisfied: pycparser in /Library/Python/2.7/site-packages (from cffi!=1.11.3,>=1.7->cryptography->ansible==2.7.13) (2.19)
Installing collected packages: ansible
Found existing installation: ansible 2.8.5
Uninstalling ansible-2.8.5:
Successfully uninstalled ansible-2.8.5
Running setup.py install for ansible ... done
Successfully installed ansible-2.7.13
Alberts-MacBook-Pro:ansible albertski$ ansible --version
ansible 2.8.4
config file = /Users/albertski/Sites/ansible/ansible.cfg
configured module search path = ['/Users/albertski/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible
executable location = /Library/Frameworks/Python.framework/Versions/3.7/bin/ansible
python version = 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 03:13:28) [Clang 6.0 (clang-600.0.57)]
Operating System: OSX Mojave
You're installing Ansible with python2 pip and Ansible in your shell's path appears to be using python3.
Try the following:
sudo pip3 install ansible --upgrade
or better yet, keep it in your user homedir
pip3 install --user ansible --upgrade
Related
I want to install dataprep package in Kaggle Kernel.
As simple:
!pip install dataprep
is working but display many line Requirement already satisfied
Requirement already satisfied: dataprep in /opt/conda/lib/python3.7/site-packages (0.4.0)
Requirement already satisfied: numpy<2,>=1 in /opt/conda/lib/python3.7/site-packages (from dataprep) (1.19.5)
Requirement already satisfied: levenshtein<0.13.0,>=0.12.0 in /opt/conda/lib/python3.7/site-packages (from dataprep) (0.12.0)
Requirement already satisfied: varname<0.9.0,>=0.8.1 in /opt/conda/lib/python3.7/site-packages (from dataprep) (0.8.1)
......
From recommendation in stackoverflow I try with:
!pip install -q dataprep
But I got the error:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
beatrix-jupyterlab 3.1.1 requires google-cloud-bigquery-storage, which is not installed.
preprocessing 0.1.13 requires nltk==3.2.4, but you have nltk 3.6.3 which is incompatible.
flask 2.0.2 requires Jinja2>=3.0, but you have jinja2 2.11.3 which is incompatible.
featuretools 1.0.0 requires dask[dataframe]>=2021.2.0, but you have dask 2.30.0 which is incompatible.
distributed 2021.10.0 requires dask==2021.10.0, but you have dask 2.30.0 which is incompatible.
How does my kernel not display Requirement already satisfied in the first way?
Looks like a solution exists at
Hide "Requirement already satisfied" warning
pip install -r requirements.txt | grep -v 'already satisfied'
I am on Mac and want to create a virtual environment for python 2.7. I did the following but can't know how to access virtualenv to create the environment.
(base) congmins-MacBook-Pro:spacy congminmin$ pip --version
pip 20.1.1 from /Users/congminmin/anaconda3/lib/python3.8/site-packages/pip (python 3.8)
(base) congmins-MacBook-Pro:spacy congminmin$ pip2 --version
pip 19.2.3 from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip (python 2.7)
(base) congmins-MacBook-Pro:spacy congminmin$ pip2 install virtualenv
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Requirement already satisfied: virtualenv in /Users/congminmin/Library/Python/2.7/lib/python/site-packages (20.0.30)
Requirement already satisfied: filelock<4,>=3.0.0 in /Users/congminmin/Library/Python/2.7/lib/python/site-packages (from virtualenv) (3.0.12)
Requirement already satisfied: six<2,>=1.9.0 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from virtualenv) (1.15.0)
Requirement already satisfied: importlib-metadata<2,>=0.12; python_version < "3.8" in /Users/congminmin/Library/Python/2.7/lib/python/site-packages (from virtualenv) (1.7.0)
Requirement already satisfied: appdirs<2,>=1.4.3 in /Users/congminmin/Library/Python/2.7/lib/python/site-packages (from virtualenv) (1.4.4)
Requirement already satisfied: importlib-resources>=1.0; python_version < "3.7" in /Users/congminmin/Library/Python/2.7/lib/python/site-packages (from virtualenv) (3.0.0)
Requirement already satisfied: distlib<1,>=0.3.1 in /Users/congminmin/Library/Python/2.7/lib/python/site-packages (from virtualenv) (0.3.1)
Requirement already satisfied: pathlib2<3,>=2.3.3; python_version < "3.4" and sys_platform != "win32" in /Users/congminmin/Library/Python/2.7/lib/python/site-packages (from virtualenv) (2.3.5)
Requirement already satisfied: configparser>=3.5; python_version < "3" in /Users/congminmin/Library/Python/2.7/lib/python/site-packages (from importlib-metadata<2,>=0.12; python_version < "3.8"->virtualenv) (4.0.2)
Requirement already satisfied: zipp>=0.5 in /Users/congminmin/Library/Python/2.7/lib/python/site-packages (from importlib-metadata<2,>=0.12; python_version < "3.8"->virtualenv) (1.2.0)
Requirement already satisfied: contextlib2; python_version < "3" in /Users/congminmin/Library/Python/2.7/lib/python/site-packages (from importlib-metadata<2,>=0.12; python_version < "3.8"->virtualenv) (0.6.0.post1)
Requirement already satisfied: typing; python_version < "3.5" in /Users/congminmin/Library/Python/2.7/lib/python/site-packages (from importlib-resources>=1.0; python_version < "3.7"->virtualenv) (3.7.4.3)
Requirement already satisfied: singledispatch; python_version < "3.4" in /Users/congminmin/Library/Python/2.7/lib/python/site-packages (from importlib-resources>=1.0; python_version < "3.7"->virtualenv) (3.4.0.3)
Requirement already satisfied: scandir; python_version < "3.5" in /Users/congminmin/Library/Python/2.7/lib/python/site-packages (from pathlib2<3,>=2.3.3; python_version < "3.4" and sys_platform != "win32"->virtualenv) (1.10.0)
WARNING: You are using pip version 19.2.3, however version 20.2.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(base) congmins-MacBook-Pro:spacy congminmin$ virtualenv spacy27
-bash: virtualenv: command not found
How to make the 'virtualenv' command available?
EDIT:
I don't want to use anaconda. I just want to create a virtual env for python2.7.
I'm working on a Mac with python 2.7.
Whenever i'm trying to install scikit-image
Command used to install : sudo pip install scikit-image, i'm getting the below error :
Requirement already satisfied: python-dateutil in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from matplotlib>=1.3.1->scikit-image) (1.5)
Requirement already satisfied: tornado in /Library/Python/2.7/site-packages (from matplotlib>=1.3.1->scikit-image) (5.0.2)
Requirement already satisfied: pyparsing>=1.5.6 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from matplotlib>=1.3.1->scikit-image) (2.0.1)
Requirement already satisfied: nose in /Library/Python/2.7/site-packages (from matplotlib>=1.3.1->scikit-image) (1.3.7)
Requirement already satisfied: futures in /Library/Python/2.7/site-packages (from tornado->matplotlib>=1.3.1->scikit-image) (3.2.0)
Requirement already satisfied: singledispatch in /Library/Python/2.7/site-packages (from tornado->matplotlib>=1.3.1->scikit-image) (3.4.0.3)
Requirement already satisfied: backports_abc>=0.4 in /Library/Python/2.7/site-packages (from tornado->matplotlib>=1.3.1->scikit-image) (0.5)
Installing collected packages: numpy, PyWavelets, scipy, six, decorator, networkx, scikit-image
Found existing installation: numpy 1.8.0rc1
Cannot uninstall 'numpy'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
If I check my version of pipenv it always shows 5.3.5, but I know there is newer version 11.0.2. How can I update it using pip?
C:\hello_world>pip search pipenv
dh-pipenv (0.1.1) - Shim between dh-virtualenv and pipenv
pipenv-package-requirements (0.2) - Pipenv tools for requirements.txt
pipenv-tools (0.0.1) - The missing tools for pipenv.
tox-pipenv (1.3.0) - A pipenv plugin for tox
pipenv-to-requirements (0.3.1) - Generate requirements[-dev].txt from
Pipfile using pipenv
pipenv (11.0.2) - Python Development Workflow for Humans.
INSTALLED: 5.3.5
LATEST: 11.0.2
When installing, all I get is:
C:\hello_world>pip install pipenv
Requirement already satisfied: pipenv in c:\users\administrator\appdata\roaming\
python\python36\site-packages
Requirement already satisfied: virtualenv in c:\users\administrator\appdata\roam
ing\python\python36\site-packages (from pipenv)
Requirement already satisfied: semver in c:\users\administrator\appdata\roaming\
python\python36\site-packages (from pipenv)
Requirement already satisfied: pip in c:\python36\lib\site-packages (from pipenv
)
Requirement already satisfied: pip-tools>=1.9.0 in c:\users\administrator\appdat
a\roaming\python\python36\site-packages (from pipenv)
Requirement already satisfied: background in c:\users\administrator\appdata\roam
ing\python\python36\site-packages (from pipenv)
Requirement already satisfied: setuptools>=36.3.0 in c:\users\administrator\appd
ata\roaming\python\python36\site-packages (from pipenv)
Requirement already satisfied: pew>=0.1.26 in c:\users\administrator\appdata\roa
ming\python\python36\site-packages (from pipenv)
Requirement already satisfied: click>=6 in c:\users\administrator\appdata\roamin
g\python\python36\site-packages (from pip-tools>=1.9.0->pipenv)
Requirement already satisfied: six in c:\python36\lib\site-packages (from pip-to
ols>=1.9.0->pipenv)
Requirement already satisfied: first in c:\users\administrator\appdata\roaming\p
ython\python36\site-packages (from pip-tools>=1.9.0->pipenv)
Requirement already satisfied: futures in c:\users\administrator\appdata\roaming
\python\python36\site-packages (from background->pipenv)
Requirement already satisfied: virtualenv-clone>=0.2.5 in c:\users\administrator
\appdata\roaming\python\python36\site-packages (from pew>=0.1.26->pipenv)
Requirement already satisfied: pythonz-bd>=1.10.2 in c:\users\administrator\appd
ata\roaming\python\python36\site-packages (from pew>=0.1.26->pipenv)
Requirement already satisfied: resumable-urlretrieve; python_version == "3.6" in
c:\users\administrator\appdata\roaming\python\python36\site-packages (from pyth
onz-bd>=1.10.2->pew>=0.1.26->pipenv)
Requirement already satisfied: requests in c:\python36\lib\site-packages (from r
esumable-urlretrieve; python_version == "3.6"->pythonz-bd>=1.10.2->pew>=0.1.26->
pipenv)
The question is very simple, but mostly code to show you guy what I'm seeing. So this is basically filler text so that StackOverflow stops flagging that the question is mostly code. Please help.
The right way to upgrade is upgrade:
pip install --upgrade pipenv
I have been trying to install pylint to be used on terminal, but have been unsuccessful in using it. The installation gets successful, but whenever I try to run pylint command, it returns the following error -
-bash: pylint: command not found
I have tried using following commands -
pip install pylint
python -m pip install pylint
sudo pip install pylint
sudo -H pip install pylint
I have uninstalled it, before trying each of the above command, but everytime I install it, the installation gets successful, but I am unable to use it on command line. I know it's something silly I am missing.
Here's the output I get on installation -
My-Mac:Dev noob$ sudo -H pip install pylint
Collecting pylint
Using cached pylint-1.6.5-py2.py3-none-any.whl
Requirement already satisfied: isort>=4.2.5 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from pylint)
Requirement already satisfied: six in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from pylint)
Requirement already satisfied: mccabe in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from pylint)
Requirement already satisfied: configparser; python_version == "2.7" in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from pylint)
Requirement already satisfied: backports.functools-lru-cache; python_version == "2.7" in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from pylint)
Requirement already satisfied: astroid<1.5.0,>=1.4.5 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from pylint)
Requirement already satisfied: wrapt in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from astroid<1.5.0,>=1.4.5->pylint)
Requirement already satisfied: lazy-object-proxy in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from astroid<1.5.0,>=1.4.5->pylint)
Installing collected packages: pylint
Successfully installed pylint-1.6.5
PS: I am using macOS Sierra 10.12.3 on a Macbook pro Late 2011, in case this is relevant.
The issue is installed python executables aren't being added to your path. Our paths don't look exactly the same (probably because different python versions, I'm not sure) but mine is
host:~ williamhammond$ pip install pylint
Requirement already satisfied: pylint in /Users/williamhammond/Library/Python/3.7/lib/python/site-packages (2.3.1)
Requirement already satisfied: astroid<3,>=2.2.0 in /Users/williamhammond/Library/Python/3.7/lib/python/site-packages (from pylint) (2.2.5)
Requirement already satisfied: isort<5,>=4.2.5 in /Users/williamhammond/Library/Python/3.7/lib/python/site-packages (from pylint) (4.3.21)
Requirement already satisfied: mccabe<0.7,>=0.6 in /Users/williamhammond/Library/Python/3.7/lib/python/site-packages (from pylint) (0.6.1)
Requirement already satisfied: wrapt in /Users/williamhammond/Library/Python/3.7/lib/python/site-packages (from astroid<3,>=2.2.0->pylint) (1.11.2)
Requirement already satisfied: six in /Users/williamhammond/Library/Python/3.7/lib/python/site-packages (from astroid<3,>=2.2.0->pylint) (1.12.0)
Requirement already satisfied: typed-ast>=1.3.0; implementation_name == "cpython" in /Users/williamhammond/Library/Python/3.7/lib/python/site-packages (from astroid<3,>=2.2.0->pylint) (1.4.0)
Requirement already satisfied: lazy-object-proxy in /Users/williamhammond/Library/Python/3.7/lib/python/site-packages (from astroid<3,>=2.2.0->pylint) (1.4.1)
I was seeing the same issues as you until I looked here
host:~ williamhammond$ ls /Users/williamhammond/Library/Python/3.7/bin/
dmypy epylint isort mypy pep8 pylint pyreverse stubgen symilar
Once you add this to your path like
export PATH=$PATH:/Users/williamhammond/Library/Python/3.7/bin/
you should be able to use pylint. To make this change permanent make sure to add the command to your ~/.bashrc
For the very last comment in the response given by William Hammond on making this change permanent make sure to add the command to your ~/.bashrc, you'd find the hyperlink above a useful guide to get this done: