BROWNIE - installation issue

I am trying to install Brownie and get the following error

"   PS C:\Python39> pip install eth-brownie
    Collecting eth-brownie
      Using cached eth_brownie-1.14.6-py3-none-any.whl (207 kB)
    Collecting execnet==1.8.0
      Using cached execnet-1.8.0-py2.py3-none-any.whl (39 kB)
    Collecting prompt-toolkit==3.0.18
      Using cached prompt_toolkit-3.0.18-py3-none-any.whl (367 kB)
    Requirement already satisfied: eth-utils==1.10.0 in c:\python39\lib\site-packages (from eth-brownie) (1.10.0)
    Collecting typing-extensions==3.7.4.3
      Using cached typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
    Requirement already satisfied: urllib3==1.26.4 in c:\python39\lib\site-packages (from eth-brownie) (1.26.4)
    Collecting pythx==1.6.1
      Using cached pythx-1.6.1-py2.py3-none-any.whl (39 kB)
    Requirement already satisfied: pyparsing==2.4.7 in c:\users\jgc\appdata\roaming\python\python39\site-packages (from eth-brownie) (2.4.7)
    Collecting pyyaml==5.4.1
      Using cached PyYAML-5.4.1-cp39-cp39-win_amd64.whl (213 kB)
    Collecting pytest-xdist==1.34.0
      Using cached pytest_xdist-1.34.0-py2.py3-none-any.whl (36 kB)
    Requirement already satisfied: toolz==0.11.1 in c:\python39\lib\site-packages (from eth-brownie) (0.11.1)
    Collecting jsonschema==3.2.0
      Using cached jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
    Collecting attrs==20.3.0
      Using cached attrs-20.3.0-py2.py3-none-any.whl (49 kB)
    Collecting sortedcontainers==2.3.0
      Using cached sortedcontainers-2.3.0-py2.py3-none-any.whl (29 kB)
    Requirement already satisfied: iniconfig==1.1.1 in c:\python39\lib\site-packages (from eth-brownie) (1.1.1)
    Collecting vyper==0.2.12
      Using cached vyper-0.2.12-py3-none-any.whl (222 kB)
    Collecting bitarray==1.2.2
      Using cached bitarray-1.2.2.tar.gz (48 kB)
    Requirement already satisfied: idna==2.10 in c:\python39\lib\site-packages (from eth-brownie) (2.10)
    Collecting requests==2.25.1
      Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
    Requirement already satisfied: netaddr==0.8.0 in c:\python39\lib\site-packages (from eth-brownie) (0.8.0)
    Collecting asttokens==2.0.4
      Using cached asttokens-2.0.4-py2.py3-none-any.whl (20 kB)
    Requirement already satisfied: chardet==4.0.0 in c:\python39\lib\site-packages (from eth-brownie) (4.0.0)
    Requirement already satisfied: eth-typing==2.2.2 in c:\python39\lib\site-packages (from eth-brownie) (2.2.2)
    Collecting inflection==0.5.0
      Using cached inflection-0.5.0-py2.py3-none-any.whl (5.8 kB)
    Requirement already satisfied: pycryptodome==3.10.1 in c:\python39\lib\site-packages (from eth-brownie) (3.10.1)
    Collecting eth-keyfile==0.5.1
      Using cached eth_keyfile-0.5.1-py3-none-any.whl (8.3 kB)
    Collecting websockets==8.1
      Using cached websockets-8.1.tar.gz (58 kB)
    Collecting pytest==6.2.3
      Using cached pytest-6.2.3-py3-none-any.whl (280 kB)
    Requirement already satisfied: rlp==1.2.0 in c:\python39\lib\site-packages (from eth-brownie) (1.2.0)
    Collecting py-solc-ast==1.2.8
      Using cached py_solc_ast-1.2.8-py3-none-any.whl (10.0 kB)
    Requirement already satisfied: eth-keys==0.3.3 in c:\python39\lib\site-packages (from eth-brownie) (0.3.3)
    Collecting tqdm==4.60.0
      Using cached tqdm-4.60.0-py2.py3-none-any.whl (75 kB)
    Collecting eth-rlp==0.2.1
      Using cached eth_rlp-0.2.1-py3-none-any.whl (5.0 kB)
    Collecting pathspec==0.8.1
      Using cached pathspec-0.8.1-py2.py3-none-any.whl (28 kB)
    Collecting pytest-forked==1.3.0
      Using cached pytest_forked-1.3.0-py2.py3-none-any.whl (4.7 kB)
    Collecting click==7.1.2
      Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
    Collecting py-solc-x==1.1.0
      Using cached py_solc_x-1.1.0-py3-none-any.whl (15 kB)
    Collecting eth-event==1.2.3
      Using cached eth_event-1.2.3-py3-none-any.whl (7.3 kB)
    Collecting multiaddr==0.0.9
      Using cached multiaddr-0.0.9-py2.py3-none-any.whl (16 kB)
    Requirement already satisfied: packaging==20.9 in c:\python39\lib\site-packages (from eth-brownie) (20.9)
    Collecting protobuf==3.15.8
      Using cached protobuf-3.15.8-py2.py3-none-any.whl (173 kB)
    Requirement already satisfied: six==1.15.0 in c:\python39\lib\site-packages (from eth-brownie) (1.15.0)
    Requirement already satisfied: varint==1.0.2 in c:\python39\lib\site-packages (from eth-brownie) (1.0.2)
    Collecting mypy-extensions==0.4.3
      Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
    Requirement already satisfied: eth-hash[pycryptodome]==0.3.1 in c:\python39\lib\site-packages (from eth-brownie) (0.3.1)
    Collecting semantic-version==2.8.5
      Using cached semantic_version-2.8.5-py2.py3-none-any.whl (15 kB)
    Collecting pygments-lexer-solidity==0.7.0
      Using cached pygments-lexer-solidity-0.7.0.tar.gz (7.3 kB)
    Requirement already satisfied: py==1.10.0 in c:\python39\lib\site-packages (from eth-brownie) (1.10.0)
    Requirement already satisfied: cytoolz==0.11.0 in c:\python39\lib\site-packages (from eth-brownie) (0.11.0)
    Requirement already satisfied: wcwidth==0.2.5 in c:\users\jgc\appdata\roaming\python\python39\site-packages (from eth-brownie) (0.2.5)
    Collecting eth-account==0.5.4
      Using cached eth_account-0.5.4-py3-none-any.whl (94 kB)
    Collecting psutil==5.8.0
      Using cached psutil-5.8.0-cp39-cp39-win_amd64.whl (246 kB)
    Collecting pygments==2.8.1
      Using cached Pygments-2.8.1-py3-none-any.whl (983 kB)
    Collecting eth-abi==2.1.1
      Using cached eth_abi-2.1.1-py3-none-any.whl (27 kB)
    Requirement already satisfied: parsimonious==0.8.1 in c:\python39\lib\site-packages (from eth-brownie) (0.8.1)
    Collecting apipkg==1.5
      Using cached apipkg-1.5-py2.py3-none-any.whl (4.9 kB)
    Collecting hypothesis==6.10.0
      Using cached hypothesis-6.10.0-py3-none-any.whl (364 kB)
    Collecting black==20.8b1
      Using cached black-20.8b1-py3-none-any.whl
    Requirement already satisfied: certifi==2020.12.5 in c:\python39\lib\site-packages (from eth-brownie) (2020.12.5)
    Requirement already satisfied: pluggy==0.13.1 in c:\python39\lib\site-packages (from eth-brownie) (0.13.1)
    Collecting pyjwt==1.7.1
      Using cached PyJWT-1.7.1-py2.py3-none-any.whl (18 kB)
    Requirement already satisfied: pyrsistent==0.17.3 in c:\python39\lib\site-packages (from eth-brownie) (0.17.3)
    Collecting regex==2021.4.4
      Using cached regex-2021.4.4-cp39-cp39-win_amd64.whl (270 kB)
    Collecting vvm==0.1.0
      Using cached vvm-0.1.0-py3-none-any.whl (11 kB)
    Requirement already satisfied: hexbytes==0.2.1 in c:\python39\lib\site-packages (from eth-brownie) (0.2.1)
    Collecting ipfshttpclient==0.7.0a1
      Using cached ipfshttpclient-0.7.0a1-py3-none-any.whl (231 kB)
    Collecting lru-dict==1.1.7
      Using cached lru-dict-1.1.7.tar.gz (10 kB)
    Collecting mythx-models==1.9.1
      Using cached mythx_models-1.9.1-py2.py3-none-any.whl (82 kB)
    Collecting python-dotenv==0.16.0
      Using cached python_dotenv-0.16.0-py2.py3-none-any.whl (18 kB)
    Collecting typed-ast==1.4.3
      Using cached typed_ast-1.4.3-cp39-cp39-win_amd64.whl (158 kB)
    Requirement already satisfied: toml==0.10.2 in c:\python39\lib\site-packages (from eth-brownie) 
    (0.10.2)
    Requirement already satisfied: base58==2.1.0 in c:\python39\lib\site-packages (from eth-brownie) (2.1.0)
    Collecting web3==5.18.0
      Using cached web3-5.18.0-py3-none-any.whl (469 kB)
    Collecting python-dateutil==2.8.1
      Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
    Collecting appdirs==1.4.4
      Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
    Requirement already satisfied: setuptools in c:\python39\lib\site-packages (from jsonschema==3.2.0->eth-brownie) (56.0.0)
    Collecting atomicwrites>=1.0
      Using cached atomicwrites-1.4.0-py2.py3-none-any.whl (6.8 kB)
    Requirement already satisfied: colorama in c:\users\jgc\appdata\roaming\python\python39\site-packages (from pytest==6.2.3->eth-brownie) (0.4.4)
    Requirement already satisfied: pywin32>=223 in c:\users\jgc\appdata\roaming\python\python39\site-packages (from web3==5.18.0->eth-brownie) (301)
    Using legacy 'setup.py install' for bitarray, since package 'wheel' is not installed.
    Using legacy 'setup.py install' for lru-dict, since package 'wheel' is not installed.
    Using legacy 'setup.py install' for pygments-lexer-solidity, since package 'wheel' is not installed.
    Using legacy 'setup.py install' for websockets, since package 'wheel' is not installed.
    Installing collected packages: attrs, atomicwrites, requests, python-dateutil, pytest, multiaddr, jsonschema, inflection, eth-rlp, eth-keyfile, eth-abi, bitarray, apipkg, websockets, typing-extensions, typed-ast, sortedcontainers, semantic-version, regex, pytest-forked, pyjwt, pygments, 
    protobuf, pathspec, mythx-models, mypy-extensions, lru-dict, ipfshttpclient, execnet, eth-account, click, asttokens, appdirs, web3, vyper, vvm, tqdm, pyyaml, pythx, python-dotenv, pytest-xdist, pygments-lexer-solidity, py-solc-x, py-solc-ast, psutil, prompt-toolkit, hypothesis, eth-event, black, eth-brownie
      Attempting uninstall: python-dateutil
        Found existing installation: python-dateutil 2.8.2
        Uninstalling python-dateutil-2.8.2:
          Successfully uninstalled python-dateutil-2.8.2
      WARNING: Failed to write executable - trying to use .deleteme logic
    ERROR: Could not install packages due to an OSError: [WinError 2] The system cannot find the file specified: 'c:\\python39\\Scripts\\py.test.exe' -> 'c:\\python39\\Scripts\\py.test.exe.deleteme'
    
    PS C:\Python39>

Solution 1:

Solution - Make sure that you are logged onto Visual Studio Code as administrator.

How to Run Visual Studio as an administrator Open the Start menu, and scroll to Visual Studio. From the right-click or context menu of Visual Studio, select More > Run as administrator. When Visual Studio starts, (Administrator) appears after the product name in the title bar.

Solution 2:

Could you please format it more nicely (next time) so it's more readable? Thanks!

Either way, it looks like you aren't doing this/started the terminal/executing the command as an administrator as suggested by the warning WARNING: Failed to write executable - trying to use .deleteme logic. A similar issue posted on this GitHub seems to confirm that. So the fix would be to restart the terminal as an admin and try again, I think.