Unable to install scikit-image - macos

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.

Related

ModuleNotFoundError: No module named 'rest_framework_nested'

It shows that everything is propper installed
(storefront) (base) ...#MacBook-Pro storefront % pip install drf-nested-routers
Requirement already satisfied: drf-nested-routers in /Users/.../.local/share/virtualenvs/storefront-JGOY8xqq/lib/python3.10/site-packages (0.93.4)
Requirement already satisfied: Django>=1.11 in /Users/.../.local/share/virtualenvs/storefront-JGOY8xqq/lib/python3.10/site-packages (from drf-nested-routers) (4.1.3)
Requirement already satisfied: djangorestframework>=3.6.0 in /Users/.../.local/share/virtualenvs/storefront-JGOY8xqq/lib/python3.10/site-packages (from drf-nested-routers) (3.14.0)
Requirement already satisfied: sqlparse>=0.2.2 in /Users/.../.local/share/virtualenvs/storefront-JGOY8xqq/lib/python3.10/site-packages (from Django>=1.11->drf-nested-routers) (0.4.3)
Requirement already satisfied: asgiref<4,>=3.5.2 in /Users/.../.local/share/virtualenvs/storefront-JGOY8xqq/lib/python3.10/site-packages (from Django>=1.11->drf-nested-routers) (3.5.2)
Requirement already satisfied: pytz in /Users/../.local/share/virtualenvs/storefront-JGOY8xqq/lib/python3.10/site-packages (from djangorestframework>=3.6.0->drf-nested-routers) (2022.6)
(storefront) (base) ...#MacBook-Pro storefront %
But still get the Error:
in
from rest_framework_nested import routers
ModuleNotFoundError: No module named 'rest_framework_nested'

Ansible is not upgrading even when it says successful

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

pip install error with proxy on installing second package

I have met some error when running pip install google-api-python-client --proxy http://10.10.40.10:80 , as follow details.
Downloading/unpacking google-api-python-client
Downloading google_api_python_client-1.6.6-py2.py3-none-any.whl (53kB): 53kB downloaded
Downloading/unpacking oauth2client>=1.5.0,<5.0.0dev (from google-api-python-client)
Real name of requirement oauth2client is oauth2client
however, it's no problem when installing 'future' package which don't deploy packages ( like enum, futures, six, rsa.,),
need to update pip with resolved: pip install google-api-python-client --proxy http://10.10.40.10:80
'Requirement already satisfied: google-api-python-client in ./lib/python2.7/site-packages (1.6.6)
Requirement already satisfied: six<2dev,>=1.6.1 in ./lib/python2.7/site-packages (from google-api-python-client) (1.11.0)
Requirement already satisfied: uritemplate<4dev,>=3.0.0 in ./lib/python2.7/site-packages (from google-api-python-client) (3.0.0)
Requirement already satisfied: oauth2client<5.0.0dev,>=1.5.0 in ./lib/python2.7/site-packages (from google-api-python-client) (4.1.2)
Requirement already satisfied: httplib2<1dev,>=0.9.2 in ./lib/python2.7/site-packages (from google-api-python-client) (0.11.3)
Requirement already satisfied: rsa>=3.1.4 in ./lib/python2.7/site-packages (from oauth2client<5.0.0dev,>=1.5.0->google-api-python-client) (3.4.2)
Requirement already satisfied: pyasn1-modules>=0.0.5 in ./lib/python2.7/site-packages (from oauth2client<5.0.0dev,>=1.5.0->google-api-python-client) (0.2.1)
Requirement already satisfied: pyasn1>=0.1.7 in ./lib/python2.7/site-packages (from oauth2client<5.0.0dev,>=1.5.0->google-api-python-client) (0.4.2)'

Why can't I update pipenv to latest version?

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

-bash: pylint: command not found

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:

Resources