module1 (x.y.z) module2 (x.y.z) module3 (x.y.z)
module1==x.y.z module2==x.y.z module3==x.y.z
Name: wstools Version: 0.4.3 Summary: wstools Home-page: https://github.com/pycontribs/wstools.git Author: Gregory Warnes, kiorky, sorin Author-email: Gregory.R.Warnes@Pfizer.com, kiorky@cryptelium.net, sorin.sbarnea+os@gmail.com License: UNKNOWN Location: /usr/lib/python2.7/dist-packages Requires:
Python 2.7.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516] on linux2 Type "help", "copyright", "credits" or "license" for more information.
Please wait a moment while I gather a list of all available modules... BaseHTTPServer argparse ihooks samba Bastion array imaplib sched CDROM ast imghdr secretstorage CGIHTTPServer asynchat imp select
Collecting ansible Downloading https://files.pythonhosted.org/packages/e8/b2/c10b82573bb494d9e0764b5c75eb7be1e649082435280f2220976d1a3b33/ansible-2.9.11.tar.gz (14.2MB) 100% |████████████████████████████████| 14.3MB 94kB/s Saved ./ansible-2.9.11.tar.gz Collecting PyYAML (from ansible) Downloading https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz (269kB) 100% |████████████████████████████████| 276kB 1.1MB/s Saved ./PyYAML-5.3.1.tar.gz Collecting cryptography (from ansible) Downloading https://files.pythonhosted.org/packages/26/d6/e8b087b9ae062d737c67c3bf76e30333bda9295ca17205062e8ed2c872de/cryptography-3.0-cp35-abi3-manylinux1_x86_64.whl (2.7MB) 100% |████████████████████████████████| 2.7MB 368kB/s Saved ./cryptography-3.0-cp35-abi3-manylinux1_x86_64.whl Collecting jinja2 (from ansible) Downloading https://files.pythonhosted.org/packages/30/9e/f663a2aa66a09d838042ae1a2c5659828bb9b41ea3a6efa20a20fd92b121/Jinja2-2.11.2-py2.py3-none-any.whl (125kB) 100% |████████████████████████████████| 133kB 2.2MB/s Saved ./Jinja2-2.11.2-py2.py3-none-any.whl Collecting six>=1.4.1 (from cryptography->ansible) Downloading https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl Saved ./six-1.15.0-py2.py3-none-any.whl Collecting cffi!=1.11.3,>=1.8 (from cryptography->ansible) Downloading https://files.pythonhosted.org/packages/d1/fd/10e2050b3afcb03d78b2b33212c3ff17b3985ae25d0feb34c0c9eb417549/cffi-1.14.1-cp37-cp37m-manylinux1_x86_64.whl (401kB) 100% |████████████████████████████████| 409kB 1.1MB/s Saved ./cffi-1.14.1-cp37-cp37m-manylinux1_x86_64.whl Collecting MarkupSafe>=0.23 (from jinja2->ansible) Using cached https://files.pythonhosted.org/packages/98/7b/ff284bd8c80654e471b769062a9b43cc5d03e7a615048d96f4619df8d420/MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl Saved ./MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography->ansible) Using cached https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl Saved ./pycparser-2.20-py2.py3-none-any.whl Successfully downloaded ansible PyYAML cryptography jinja2 six cffi MarkupSafe pycparser
---------------------------------------- Failed building wheel for ansible Running setup.py clean for ansible Running setup.py bdist_wheel for pycparser ... error Complete output from command /home/kevin/myGreatProject/myVirtualEnvironment/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-bz2ssx4w/pycparser/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-0z6zygi4 --python-tag cp37: error: invalid command 'bdist_wheel' ----------------------------------------
Collecting ansible==
Could not find a version that satisfies the requirement ansible== (from versions: 1.0, 1.1, 1.2, 1.2.1, 1.2.2, 1.2.3, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1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.7.11, 2.7.12, 2.7.13, 2.8.0a1, 2.8.0b1, 2.8.0rc1, 2.8.0rc2, 2.8.0rc3, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.8.5, 2.9.0b1, 2.9.0rc1, 2.9.0rc2, 2.9.0rc3)
No matching distribution found for ansible==
Improved version :
),
' '\n
' | grep -E '^[0-9]
' | sort -nr | less2.9.0rc3 2.9.0rc2 2.9.0rc1 2.9.0b1 2.8.5 2.8.4 2.8.3
building 'psutil._psutil_linux' extension creating build/temp.linux-x86_64-3.7 creating build/temp.linux-x86_64-3.7/psutil x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=563 -DPSUTIL_LINUX=1 -I/home/bob/virtualenvs/projectName/include -I/usr/include/python3.7m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.7/psutil/_psutil_common.o psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory the line above the error #include <Python.h> ^~~~~~~~~~ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 the error
Sometimes it's the line above this error you should look at. It should tell you what package is missing.
Check :
libpython3.7-dev:amd64: /usr/include/python3.7m/Python.h
Traceback (most recent call last): File "/usr/local/bin/youtube-dl", line 6, in <module> from youtube_dl import main ImportError: cannot import name 'main'
/usr/bin/mandb: can't search directory /usr/local/man: Permission deniedwhich is pretty unexpected since this was run as root. Looks like permissions were pretty f*cked up already :
lrwxrwxrwx 1 root staff 9 Oct 11 2016 /usr/local/man -> share/man
drwx--S--- 3 root staff 4096 Mar 19 11:14 /usr/local/share/man
Solution :
This GitHub issue details the reasons of this error (the PEBKAC part, notably) and hints to debug / fix.
/usr/local/bin/youtube-dl
Traceback (most recent call last): File "/usr/local/bin/youtube-dl", line 6, in <module> from youtube_dl import main ImportError: cannot import name 'main'
#!/usr/bin/python3
(returns the 'usage' page, but no error)
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 639, in __init__ File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 695, in add_entry File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2012, in find_on_path PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/youtube_dl-2019.3.18.dist-info'
drwx--S--- 6 root staff 4.0K Mar 19 08:52 youtube_dl drwx--S--- 2 root staff 4.0K Mar 19 08:52 youtube_dl-2019.3.18.dist-info
(the 'usage' page )
This is highly context-specific and not exactly a "clean" solution, but maybe this will give you hints to find the root cause on your side... If anything, this issue,at least, led me to some best practices :
First, some general advice. It is assumed that anyone encountering issues will have failed to follow some part of this advice. Listing these items here is not intended to imply that "it's your fault and we won't help", but rather to help users to identify what went wrong, so that they can work out what to do next more easily.
PATH
issues you need to be aware of here. We'll cover these later. Put simply, it's possible to follow this advice, and still hit problems, because you're not actually running the wrapper you installed as --user....
MANY lines describing the exceptions
...
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
Collecting pip Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB) 100% |████████████████████████████████| 1.3MB 781kB/s Installing collected packages: pip Successfully installed pip-9.0.1
Collecting pip Using cached pip-9.0.1-py2.py3-none-any.whl Collecting wheel Downloading wheel-0.30.0-py2.py3-none-any.whl (49kB) 100% |████████████████████████████████| 51kB 718kB/s Installing collected packages: pip, wheel Successfully installed pip-9.0.1 wheel-0.30.0
Collecting mps-youtube Downloading mps_youtube-0.2.7.1-py3-none-any.whl (74kB) 100% |████████████████████████████████| 81kB 974kB/s Requirement already satisfied: pafy!=0.4.0,!=0.4.1,!=0.4.2,>=0.3.82 in /usr/lib/python3/dist-packages (from mps-youtube) Installing collected packages: mps-youtube Successfully installed mps-youtube-0.2.7.1
apt install python3-pip; pip3 install requests