Here's the output of a pip install --upgrade:
[vagrant#cclab8-ht-esx-11 f5]$ sudo pip install f5-icontrol-rest --upgrade
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.
Looking in indexes: https://pypi.org/simple, https://apds-web1.noc.bluecoatcloud.com/symc_pypi/symc_pypi_server.wsgi
Collecting f5-icontrol-rest
Using cached https://files.pythonhosted.org/packages/e0/44/91979de0a81253d025a0814f16f53df46d3ed3edd5b9fd7181f28a9dd0bb/f5-icontrol-rest-1.3.13.tar.gz
Requirement already satisfied, skipping upgrade: requests<3,>=2.5.0 in /usr/lib/python2.7/site-packages (from f5-icontrol-rest) (2.21.0)
Requirement already satisfied, skipping upgrade: urllib3<1.25,>=1.21.1 in /usr/lib/python2.7/site-packages (from requests<3,>=2.5.0->f5-icontrol-rest) (1.24.1)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/site-packages (from requests<3,>=2.5.0->f5-icontrol-rest) (3.0.4)
Requirement already satisfied, skipping upgrade: idna<2.9,>=2.5 in /usr/lib/python2.7/site-packages (from requests<3,>=2.5.0->f5-icontrol-rest) (2.8)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests<3,>=2.5.0->f5-icontrol-rest) (2018.11.29)
Building wheels for collected packages: f5-icontrol-rest
Building wheel for f5-icontrol-rest (setup.py) ... done
Stored in directory: /root/.cache/pip/wheels/12/43/4c/9c3051759105429cd633ed53ece367db44b082fce01c28db46
Successfully built f5-icontrol-rest
Installing collected packages: f5-icontrol-rest
Found existing installation: f5-icontrol-rest 1.3.12
Uninstalling f5-icontrol-rest-1.3.12:
Successfully uninstalled f5-icontrol-rest-1.3.12
Successfully installed f5-icontrol-rest-1.3.13
You are using pip version 19.0.2, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
The issue is that my system requests package is version 2.21.0, and 2.21.0 is not greater than or equal to 2.5.0, yet pip says that the requirement is satisfied.
I do not understand this line:
Requirement already satisfied, skipping upgrade: requests<3,>=2.5.0 in /usr/lib/python2.7/site-packages (from f5-icontrol-rest) (2.21.0)
Does anyone understand why the requirement is satisfied? Why was requests not upgraded?
So yeah, 2.5.0 isn't the same as 2.50.0.
Related
I am running Catalina MacOS with python 3.7.5. I am trying to run an ansible script to install a VM. This Requires python >= 2.6 and PyVmomi. I have installed PyVomi and pyVim via pip. Both were installed successfully. When I run the playbook, I get the error message below. Not sure what I am missing.
TASK [Create a virtual machine on given ESXi hostname] *************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ImportError: No module named pyVim
fatal: [localhost -> localhost]: FAILED! => {"changed": false, "msg": "Failed to import the required Python library (PyVmomi) on MacBook-Pro.local's Python /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python. Please read module documentation and install in the appropriate location"}
ArunJose_Intel is correct. The module is pyvmomi, not pyVim. Although the error indicates that the pyVim library was missing. It was misleading as I could see it in my directory. Following his advice I changed the pip install command to install pyvmomi instead.
pip install pyvmomi
I was able to run the python script with pyVim imported. Thank you Arun.
You might have installed PyVomi and pyVim for the wrong python executable. You have to make sure you are installing via pip to the right python. You are installing the packages to the python3.x present in your machine. What you have to do is to install the pip packages to the python of the playbook
I fixed it.
pip3 install ansible
That made ansible use python3
Sorry for the confusion. I have installed this via pip3, is yes they are installed in the python3 directories.
pip3 install PyVmomi
Requirement already satisfied: PyVmomi in /usr/local/lib/python3.7/site-packages (6.7.3)
Requirement already satisfied: requests>=2.3.0 in /usr/local/lib/python3.7/site-packages (from PyVmomi) (2.22.0)
Requirement already satisfied: six>=1.7.3 in /usr/local/lib/python3.7/site-packages (from PyVmomi) (1.13.0)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/site-packages (from requests>=2.3.0->PyVmomi) (2019.9.11)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/site-packages (from requests>=2.3.0->PyVmomi) (1.25.7)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/site-packages (from requests>=2.3.0->PyVmomi) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.7/site-packages (from requests>=2.3.0->PyVmomi) (2.8)
pip3 install pyVim
Requirement already satisfied: pyVim in /usr/local/lib/python3.7/site-packages (3.0.2)
Requirement already satisfied: docopt in /usr/local/lib/python3.7/site-packages (from pyVim) (0.6.2)
Requirement already satisfied: prompt-toolkit<3.1.0,>=2.0.0 in /usr/local/lib/python3.7/site-packages (from pyVim) (3.0.2)
Requirement already satisfied: pyflakes in /usr/local/lib/python3.7/site-packages (from pyVim) (2.1.1)
Requirement already satisfied: pygments in /usr/local/lib/python3.7/site-packages (from pyVim) (2.5.2)
Requirement already satisfied: six in /usr/local/lib/python3.7/site-packages (from pyVim) (1.13.0)
Requirement already satisfied: wcwidth in /usr/local/lib/python3.7/site-packages (from prompt-toolkit<3.1.0,>=2.0.0->pyVim) (0.1.7)
In an attempt to access and run Matlab code via Jupyter notebook and Python, I tried installing 'matlab_kernal' (w/ typo) and 'matlab_kernel' as suggested by a blog, I didn't realize I needed MatLab, not MatLab Compiler Runtime.
I received the error:
"Collecting matlab_kernal
Could not find a version that satisfies the requirement matlab_kernal (from versions: )
No matching distribution found for matlab_kernal"
As a work around, I found python code on GitHub that calculated the metric I wanted, but the author said I'd need to install 'MPI' from 'mpi4py'.
However, it seems my Terminal is now stuck on my previous installation attempts of 'matlab_kernal'. It lists my previous attempts to install these packages (see all white text above red error message in the attached screen capture).
I'm running: pip 18.1 from /anaconda3/lib/python3.7/site-packages/pip (python 3.7)
I've tried:
pip uninstall 'package'
Terminal restart
laptop restart
Screenshot of Terminal error
Please use:
pip install matlab-kernel
Try with conda as well:
conda install -c pchrapka matlab_kernel
I think you're making a typo with kernal.
I am on py3.7 with pip v19.3.
Output:
$ pip install matlab-kernel
Collecting matlab-kernel
Downloading https://files.pythonhosted.org/packages/64/ad/5f471160ec33e2f0f3586d285cd5e3b6dff51027849f28369d43d1d57fd1/matlab_kernel-0.16.7-py3-none-any.whl
Requirement already satisfied: jupyter-client>=4.4.0 in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from matlab-kernel) (5.3.4)
Collecting metakernel>=0.23.0
Downloading https://files.pythonhosted.org/packages/ad/a9/0cd74cfbc9c4aeb117bdb7fd9ff12c3890be34ef5c77932e00ef4afaca98/metakernel-0.24.3-py2.py3-none-any.whl (208kB)
|████████████████████████████████| 215kB 246kB/s
Collecting wurlitzer>=1.0.2; platform_system != "Windows"
Downloading https://files.pythonhosted.org/packages/24/5e/f3bd8443bfdf96d2f5d10097d301076a9eb55637b7864e52d2d1a4d8c72a/wurlitzer-2.0.0-py2.py3-none-any.whl
Requirement already satisfied: ipython>=4.0.0 in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from matlab-kernel) (7.8.0)
Requirement already satisfied: pyzmq>=13 in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from jupyter-client>=4.4.0->matlab-kernel) (18.1.0)
Requirement already satisfied: tornado>=4.1 in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from jupyter-client>=4.4.0->matlab-kernel) (6.0.3)
Requirement already satisfied: traitlets in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from jupyter-client>=4.4.0->matlab-kernel) (4.3.3)
Requirement already satisfied: python-dateutil>=2.1 in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from jupyter-client>=4.4.0->matlab-kernel) (2.8.0)
Requirement already satisfied: jupyter-core>=4.6.0 in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from jupyter-client>=4.4.0->matlab-kernel) (4.6.0)
Requirement already satisfied: pexpect>=4.2 in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from metakernel>=0.23.0->matlab-kernel) (4.7.0)
Collecting portalocker
Downloading https://files.pythonhosted.org/packages/91/db/7bc703c0760df726839e0699b7f78a4d8217fdc9c7fcb1b51b39c5a22a4e/portalocker-1.5.2-py2.py3-none-any.whl
Requirement already satisfied: ipykernel in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from metakernel>=0.23.0->matlab-kernel) (5.1.2)
Collecting ipyparallel
Downloading https://files.pythonhosted.org/packages/3f/82/aaa7a357845a98d4028f27c799f0d3bb2fe55fc1247c73dc712b4ae2344c/ipyparallel-6.2.4-py2.py3-none-any.whl (198kB)
|████████████████████████████████| 204kB 698kB/s
Requirement already satisfied: decorator in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from ipython>=4.0.0->matlab-kernel) (4.4.0)
Requirement already satisfied: setuptools>=18.5 in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from ipython>=4.0.0->matlab-kernel) (39.0.1)
Requirement already satisfied: pickleshare in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from ipython>=4.0.0->matlab-kernel) (0.7.5)
Requirement already satisfied: prompt-toolkit<2.1.0,>=2.0.0 in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from ipython>=4.0.0->matlab-kernel) (2.0.10)
Requirement already satisfied: jedi>=0.10 in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from ipython>=4.0.0->matlab-kernel) (0.15.1)
Requirement already satisfied: pygments in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from ipython>=4.0.0->matlab-kernel) (2.4.2)
Requirement already satisfied: appnope; sys_platform == "darwin" in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from ipython>=4.0.0->matlab-kernel) (0.1.0)
Requirement already satisfied: backcall in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from ipython>=4.0.0->matlab-kernel) (0.1.0)
Requirement already satisfied: ipython-genutils in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from traitlets->jupyter-client>=4.4.0->matlab-kernel) (0.2.0)
Requirement already satisfied: six in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from traitlets->jupyter-client>=4.4.0->matlab-kernel) (1.12.0)
Requirement already satisfied: ptyprocess>=0.5 in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from pexpect>=4.2->metakernel>=0.23.0->matlab-kernel) (0.6.0)
Requirement already satisfied: wcwidth in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from prompt-toolkit<2.1.0,>=2.0.0->ipython>=4.0.0->matlab-kernel) (0.1.7)
Requirement already satisfied: parso>=0.5.0 in /Users/siddheshpisal/.pyenv/versions/3.6.7/envs/ori_venv/lib/python3.6/site-packages (from jedi>=0.10->ipython>=4.0.0->matlab-kernel) (0.5.1)
Installing collected packages: portalocker, ipyparallel, metakernel, wurlitzer, matlab-kernel
Successfully installed ipyparallel-6.2.4 matlab-kernel-0.16.7 metakernel-0.24.3 portalocker-1.5.2 wurlitzer-2.0.0
WARNING: You are using pip version 19.3; however, version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
It's a version issue for pip and MacOS
See this thread
terminal error in MacOS from command 'pip install 'package-name':
"Collecting 'package-name'
Could not find a version that satisfies the requirement 'package-name' (from versions: )
No matching distribution found for 'package-name'"
Uninstall pip and reinstall pip in terminal
i am using python 3.7.1 and recently when im trying to run matlplotlib it isnt working. im getting this error:
AttributeError: module 'matplotlib' has no attribute '_get_configdir'
i tried using "matplotlib.use("Agg")" and i still get the same error.
i tried upgrading my matlpotlib version in anacond using this command
pip install --upgrade matplotlib and i get this error.
Collecting matplotlib
Using cached https://files.pythonhosted.org/packages/1a/c0/69e3f695d7384012e90be1e16570c08953baae00fd98094179ef87c7d5a2/matplotlib-3.1.1-cp37-cp37m-win_amd64.whl
Requirement already satisfied, skipping upgrade: numpy>=1.11 in c:\users\josh\conda\lib\site-packages (from matplotlib) (1.16.3)
Requirement already satisfied, skipping upgrade: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\josh\conda\lib\site-packages (from matplotlib) (2.3.0)
Requirement already satisfied, skipping upgrade: python-dateutil>=2.1 in c:\users\josh\conda\lib\site-packages (from matplotlib) (2.7.5)
Requirement already satisfied, skipping upgrade: cycler>=0.10 in c:\users\josh\conda\lib\site-packages (from matplotlib) (0.10.0)
Requirement already satisfied, skipping upgrade: kiwisolver>=1.0.1 in c:\user\josh\conda\lib\site-packages (from matplotlib) (1.0.1)
Requirement already satisfied, skipping upgrade: six>=1.5 in c:\users\josh\conda\lib\site-packages (from python-dateutil>=2.1->matplotlib) (1.12.0)
Requirement already satisfied, skipping upgrade: setuptools in c:\users\josh\conda\lib\site-packages (from kiwisolver>=1.0.1->matplotlib) (40.6.3)
chances 0.1.6 has requirement matplotlib==2.2.3, but you'll have matplotlib 3.1.1 which is incompatible.
Installing collected packages: matplotlib
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'C:\\Users\\josh\\conda\\Lib\\site-packages\\matplotlib\\ft2font.cp37-win_amd64.pyd'
Consider using the `--user` option or check the permissions.
can anyone guide me in this?
i dont know what to do. thank you.
I tested a python script to send anythink with Pushover. But I get the error "ImportError: No module named pushover"
My installed Versions:
# pip install python-pushover
Collecting python-pushover
Using cached https://files.pythonhosted.org/packages/6f/3d/144a0137c749bd152c3ab7f4d3ce8fe1455168dab36c2fcd900d3fab16ad/python-pushover-0.4.tar.gz
Requirement already satisfied: requests>=1.0 in /usr/local/lib/python3.5/dist-packages (from python-pushover) (2.21.0)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /usr/local/lib/python3.5/dist-packages (from requests>=1.0->python-pushover) (1.24.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.5/dist-packages (from requests>=1.0->python-pushover) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.5/dist-packages (from requests>=1.0->python-pushover) (2018.11.29)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.5/dist-packages (from requests>=1.0->python-pushover) (2.8)
Installing collected packages: python-pushover
Running setup.py install for python-pushover ... done
Successfully installed python-pushover-0.4
# python -V
Python 2.7.13
# python3 -V
Python 3.5.3
The scriptheader:
#!/usr/bin/env python
import pushover
I have tried with pip(3) to install python-pushover but with no success.
I faced this exact error today. This is due to co-existing of different versions of python in your system.
Do, /usr/bin/python3 if the module was installed for py3 and just /usr/bin/python for py2 before running the script.
Refer Installed module using pip, not found for more.
In my case, you should :
uninstall that package:
pip uninstall pushover
and install the correct package:
pip install python-pushover
And your code will work fine.
I am currently getting the error, TypeError: softmax() got an unexpected keyword argument 'axis'.
It seems this error is common if you don't have up-to-date keras/tensorflow.
I checked what version of tensorflow I have with python3 -c 'import tensorflow as tf; print(tf.__version__)' It returned 0.12.0 which indeed looks out of date.
However, when I try to upgrade tensorflow, with pip3 install tensorflow --upgrade I get
Requirement already up-to-date: tensorflow in
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
(0.12.0) Requirement already satisfied, skipping upgrade:
numpy>=1.11.0 in
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages(from
tensorflow) (1.15.3) Requirement already satisfied, skipping upgrade:
protobuf==3.1.0 in
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
(from tensorflow) (3.1.0) Requirement already satisfied, skipping
upgrade: six>=1.10.0 in
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
(from tensorflow) (1.11.0) Requirement already satisfied, skipping
upgrade: wheel>=0.26 in
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
(from tensorflow) (0.32.2) Requirement already satisfied, skipping
upgrade: setuptools in
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
(from protobuf==3.1.0->tensorflow) (39.0.1)
I tried to force the update with pip3 install --ignore-installed --upgrade tensorflow but got:
Collecting tensorflow Could not find a version that satisfies the
requirement tensorflow (from versions: ) No matching distribution
found for tensorflow
When I tried to upgrade with python3 -m pip install tensorflow --upgrade:
Requirement already up-to-date: tensorflow in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (0.12.0)
Requirement already satisfied, skipping upgrade: wheel>=0.26 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from tensorflow) (0.32.2)
Requirement already satisfied, skipping upgrade: protobuf==3.1.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from tensorflow) (3.1.0)
Requirement already satisfied, skipping upgrade: numpy>=1.11.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages(from tensorflow) (1.15.3)
Requirement already satisfied, skipping upgrade: six>=1.10.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from tensorflow) (1.11.0)
Requirement already satisfied, skipping upgrade: setuptools in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from protobuf==3.1.0->tensorflow) (39.0.1)
When I print sys.path in my program, I get:
['/Users/myname/topdirect', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages']
pip3 show tensorflow I get:
Name: tensorflow
Version: 0.12.0
Summary: TensorFlow helps the tensors flow
Home-page: http://tensorflow.org/
Author: Google Inc.
Author-email: opensource#google.com
License: Apache 2.0
Location: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
Requires: six, protobuf, numpy, wheel
Required-by:
First of all, I would recommend using anaconda environment to manage your tensorflow version. On the other side, you need to add your operating system to make the question more clear.