Skip to content

Ape compile not working #2679

@Him10Agr

Description

@Him10Agr

I am new to ape. I have created project in Ubuntu24.04. These are the steps i took and getting the error. I had tried with 0.8.* versions and 0.7.23 version as well but getting same error.

$ virtualenv  .venv
(.venv) $ pip install eth-ape==0.8.36
Collecting eth-ape==0.8.36
.................
(.venv) $ ape plugins install vyper
INFO:     Installing 'vyper' plugin ...
SUCCESS:  Plugin 'vyper' has been installed.
(.venv) $ mkdir  simplestorage
(.venv) $ cd simplestorage
(.venv)/simplestorage $ ape init
(.venv)/simplestorage $ ls -a
ape-config.yaml
contracts/
.gitignore
scripts/
tests/

contracts/simplestorage.vy:

# @version ^0.4.0

num: uint256

@external
def store(num: uint256):
    self.num = num

@external
def retrieve() -> uint256:
    return self.num
(.venv)/simplestorage $ ape compile
INFO:     Compiling using Vyper compiler '0.4.3'.
Input:
	contracts/simplestorage.vy
ERROR:    (VyperCompileError) FileNotFoundError: [Errno 2] No such file or directory: '/.venv/local'

it is looking for folder name as 'local' in venv directory.

Below is my project structure

$ tree -a -L 3
.
├── simplestorage
│   ├── ape-config.yaml
│   ├── contracts
│   │   └── simplestorage.vy
│   ├── .gitignore
│   ├── scripts
│   └── tests
└── .venv
    ├── bin
    │   ...
    ├── .gitignore
    ├── include
    │   └── site
    ├── lazyasd-py2.py
    ├── lazyasd-py3.py
    ├── lib
    │   └── python3.12
    ├── LICENSE
    ├── __pycache__
    │   ├── lazyasd-py2.cpython-312.pyc
    │   └── lazyasd-py3.cpython-312.pyc
    ├── pyvenv.cfg
    ├── README.rst
    ├── share
    │   └── man
    └── vyper_git_commithash.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions