Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: package directory '<project_name>' does not exist

Tags:

python

pip

I have a simple Python package I've created. I copied the setup.py file from the Python docs, but when I run pip install . I get the following error:

~/Projects/wolfgang (master) $ pip install . Processing /Users/Cisplatin/Projects/wolfgang
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/wolfgang.egg-info
    writing pip-egg-info/wolfgang.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/wolfgang.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/wolfgang.egg-info/dependency_links.txt
    writing manifest file 'pip-egg-info/wolfgang.egg-info/SOURCES.txt'
    error: package directory 'wolfgang' does not exist

    ---------------------------------------- 
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/k5/grp3jdnn5jvcd14ffvqyr9z00000gn/T/pip-pWAjtJ-build/

I've tried searching online and there seem to be some similar problems on GitHub or StackOverflow, but they all apply to something being broken in the project itself as opposed to the setup.py file. My program does not mess around with any command line arguments or anything like that, so I'm not sure why this is happening.

Here's a link to the actual setup.py file I'm using, if that helps.

like image 217
Cisplatin Avatar asked Nov 07 '22 20:11

Cisplatin


1 Answers

  1. There is no setup.py in your repository because you removed it.

  2. There have to be a subdirectory wolfgang. Both __init__.py and vector.py must be in the subdirectory.

like image 68
phd Avatar answered Nov 15 '22 04:11

phd