Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Ninjagod1251 opened this issue Nov 4, 2021 · 6 comments
Closed

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

Ninjagod1251 opened this issue Nov 4, 2021 · 6 comments
Assignees
Labels
category: bug Something isn't working

Comments

@Ninjagod1251
Copy link
Contributor

Ninjagod1251 commented Nov 4, 2021

Environment information

WSL Ubuntu 20.04

  • Python Version: 3.8.10
  • OS: Linux 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:

  • what command you ran:
#!/bin/bash -i
#python script for quick apeworx install
#update and install python
sudo apt-get update && sudo apt-get upgrade --yes && sudo apt-get install git python3.8 python3-pip python-is-python3 python3.8-venv --yes
# install pyenv here
curl https://pyenv.run | bash
echo '# adding pyenv to local path
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
source ~/.bashrc
pyenv virtualenv apeworx && pyenv activate apeworx
#install ape
pip install -e .[dev]
ape plugins add solidity --yes
ape plugins add vyper --yes
ape plugins add infura --yes
ape plugins add etherscan --yes
ape plugins add ens --yes
  • the code that caused the failure (see this link for help with formatting code)
  • full output of the error you received

How can it be fixed?

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

@Ninjagod1251 Ninjagod1251 added the category: bug Something isn't working label Nov 4, 2021
@sabotagebeats sabotagebeats changed the title pip install -e .[dev] has issues bug: pip install -e .[dev] has issues Nov 4, 2021
@Ninjagod1251
Copy link
Contributor Author

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

@sabotagebeats
Copy link
Contributor

sabotagebeats commented Nov 4, 2021

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

@sabotagebeats
Copy link
Contributor

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

@sabotagebeats
Copy link
Contributor

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
Copy link
Contributor Author

Yes thats the same error

@sabotagebeats
Copy link
Contributor

fix documented in pyenv/pyenv-installer#112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@Ninjagod1251 @sabotagebeats and others