17

I am trying to install this package via PIP. It gives me the following error:

error: package directory 'RTbatch' does not exist

I find this weird, because the relevant setup.py does not mention any packages variable, but only py_modules.

What's wrong? Can you help me out?

Here is the full output of pip install -e RTbatch:

Obtaining file:///home/chymera/RTbatch
  Running setup.py (path:/home/chymera/RTbatch/setup.py) egg_info for package from file:///home/chymera/RTbatch
    /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'heywords'
      warnings.warn(msg)

    error: package directory 'RTbatch' does not exist
    Complete output from command python setup.py egg_info:
    /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'heywords'

  warnings.warn(msg)

running egg_info

creating RTbatch.egg-info

writing requirements to RTbatch.egg-info/requires.txt

writing RTbatch.egg-info/PKG-INFO

writing top-level names to RTbatch.egg-info/top_level.txt

writing dependency_links to RTbatch.egg-info/dependency_links.txt

writing manifest file 'RTbatch.egg-info/SOURCES.txt'

warning: manifest_maker: standard file '-c' not found



error: package directory 'RTbatch' does not exist

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /home/chymera/RTbatch
Storing debug log for failure in /home/chymera/.pip/pip.log
TheChymera
  • 17,004
  • 14
  • 56
  • 86

4 Answers4

8

py_modules takes a list of module names, not files. Your call looks for RTBatch/py.py and RTBatch_cli/py.py.

Cat Plus Plus
  • 125,936
  • 27
  • 200
  • 224
  • How can i just give it a list of files? I find it a superfluous practice to add one more directory level after the root for small packages :-/ – TheChymera Aug 19 '14 at 13:02
  • Just skip the extension. – Cat Plus Plus Aug 19 '14 at 13:46
  • 3
    The extension of the module. The extraneous `.py` part that is not needed whatsoever and which is the thing that causes the error. That extension. – Cat Plus Plus Aug 19 '14 at 14:48
  • @CatPlusPlus: So it should be `setup` instead of `setup.py`? (Somebody seems to face the same problem with my package [`hwrt`](https://github.com/MartinThoma/hwrt)) – Martin Thoma Dec 17 '14 at 18:39
1

In my case, it was about that the folder which I use for installation was corrupted. It was not installed completely. I downloaded it on my laptop and then moved it to the server. But it was broken. so I download it again and everything goes well.

shadi
  • 46
  • 1
  • 7
0

In my case, I was on Windows and the current directory was in a different drive, python <full path including drive>/setup.py install fails, had to change to the drive and folder and use python setup.py instead.

Pete Kirkham
  • 48,893
  • 5
  • 92
  • 171
0

It seems you have added project folder (RTbatch) as a package in setup.py. Just make sure to have packages list in setup.py contains only python packages (ex: folders with init.py).

Hope this fix the issue.