ApeWorX / ape

The smart contract development tool for Pythonistas, Data Scientists, and Security Professionals
https://apeworx.io
Apache License 2.0
890 stars 131 forks source link

bug: pip install -e .[dev] has issues #222

Closed Ninjagod1251 closed 2 years ago

Ninjagod1251 commented 3 years ago

Environment information

WSL Ubuntu 20.04

What went wrong?

pip install -e .[dev] has soms issues when installing. I did a fresh install of Ubuntu and created a virtual env to run the command:

Here is the first error code:

ERROR: flake8 3.9.2 has requirement pycodestyle<2.8.0,>=2.7.0, but you'll have pycodestyle 2.8.0 which is incompatible.
ERROR: twine 3.5.0 has requirement importlib-metadata>=3.6, but you'll have importlib-metadata 1.5.0 which is incompatible.
ERROR: commitizen 2.20.0 has requirement jinja2>=2.10.3, but you'll have jinja2 2.10.1 which is incompatible.

Here is the main error line:

Running setup.py develop for eth-ape
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/chris/ape/setup.py'"'"'; __file__='"'"'/home/chris/ape/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix=
         cwd: /home/chris/ape/
    Complete output (18 lines):
    running develop
    WARNING: The user site-packages directory is disabled.
    error: can't create or remove files in install directory

    The following error occurred while trying to add or remove files in the
    installation directory:

        [Errno 2] No such file or directory: '/usr/lib/python3.8/site-packages/test-easy-install-17856.write-test'

    The installation directory you specified (via --install-dir, --prefix, or
    the distutils default setting) was:

        /usr/lib/python3.8/site-packages/

    This directory does not currently exist.  Please create it and try again, or
    choose a different installation directory (using the -d or --install-dir
    option).

    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/chris/ape/setup.py'"'"'; __file__='"'"'/home/chris/ape/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix= Check the logs for full command output.

Please include information like:

How can it be fixed?

Fill this in if you have ideas on how the bug could be fixed.

Ninjagod1251 commented 3 years ago

@sabotagebeats and I were working on getting this to work and found some issues

sabotagebeats commented 3 years ago

i think this might be conflicting because of venv because at some point you installed venv

sabotagebeats commented 3 years ago

we put together a nice little script that mostly works though so that's cool 😅

sabotagebeats commented 3 years ago

is this the same error @Ninjagod1251

  Running setup.py develop for eth-ape
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/sabotage/ape/ape/setup.py'"'"'; __file__='"'"'/home/sabotage/ape/ape/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix=
         cwd: /home/sabotage/ape/ape/
    Complete output (18 lines):
    running develop
    WARNING: The user site-packages directory is disabled.
    error: can't create or remove files in install directory

    The following error occurred while trying to add or remove files in the
    installation directory:

        [Errno 2] No such file or directory: '/usr/lib/python3.8/site-packages/test-easy-install-26570.write-test'

    The installation directory you specified (via --install-dir, --prefix, or
    the distutils default setting) was:

        /usr/lib/python3.8/site-packages/

    This directory does not currently exist.  Please create it and try again, or
    choose a different installation directory (using the -d or --install-dir
    option).

    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/sabotage/ape/ape/setup.py'"'"'; __file__='"'"'/home/sabotage/ape/ape/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix= Check the logs for full command output.
Ninjagod1251 commented 3 years ago

Yes thats the same error

sabotagebeats commented 2 years ago

fix documented in https://github.com/pyenv/pyenv-installer/issues/112