ERROR: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found
I added the CP line below based on an article about Installing Tensorflow Object Detection and it resolved this issue. Basically it copies setup.py so pip can find it.
%%bash
cd models/research
cp object_detection/packages/tf2/setup.py .
pip install . --upgrade
Received 'can't find '__main__' module in 'packageName' with python package
I can easily replicate your problem, actually even without using your package:
$ python empty
.env/bin/python: can't open file 'empty': [Errno 2] No such file or directory
$ mkdir empty
$ python empty
.env/bin/python: can't find '__main__' module in 'empty'
$ python Empty
.env/bin/python: can't find '__main__' module in 'Empty'
So you are not calling your library at all, you are just giving the Python interpreter a nonexistent script name, which in case there is a like-named directory (case-insensitive even) in the working directory it tries to execute it.I was able to install your package from PyPi just fine and can import it alright, but there doesn't seem to be any entry point to it, nothing useful is exported at the top level and no executable scripts are added to Python bin:
>>> import etltest
>>> dir(etltest)
['__author__', '__builtins__', '__doc__', '__file__', '__name__', '__package__',
'__path__', '__version__']
Running the etlTest.py directly as suggested in Quickstart from your docs doesn't work either:$ python .env/lib/python2.7/site-packages/etltest/etlTest.py
2014-07-13 17:19:56,831 - settings - DEBUG - Attempting to load .env/lib/python2.7/site-packages/.etltest-settings.yml
2014-07-13 17:19:56,832 - settings - WARNING - No such file or directory .env/lib/python2.7/site-packages/.etltest-settings.yml
2014-07-13 17:19:56,832 - settings - DEBUG - Attempting to load .env/lib/python2.7/site-packages/.etltest-settings.yml
2014-07-13 17:19:56,832 - settings - WARNING - No such file or directory .env/lib/python2.7/site-packages/.etltest-settings.yml
2014-07-13 17:19:56,832 - settings - WARNING - Could not find settings file in .env/lib/python2.7/site-packages/.etltest-settings.yml,.env/lib/python2.7/site-packages/.etltest-settings.yml. Using defaults where present.
Traceback (most recent call last):
File ".env/lib/python2.7/site-packages/etltest/etlTest.py", line 73, in <module>
main(sys.argv[1:])
File ".env/lib/python2.7/site-packages/etltest/etlTest.py", line 22, in main
SettingsManager().first_run_test()
File ".env/lib/python2.7/site-packages/etltest/utilities/settings_manager.py", line 29, in __init__
self.app_name = etltest_config['app_name']
KeyError: 'app_name'
I'd say your package is not apt for ditribution yet. You might want to clean up some dependencies on your development environment and read upon setuptools
entry points to provide proper command line executables along with your package. Also it shouldn't run in debug mode by default if it's not some kind of a testing release. Dockerfile returning a non-zero code:1
you can run a container use image nvidia/cuda:9.0-runtime, try pip install command in the container and see what the command return
Related Topics
Python Progress Bar and Downloads
Setting Up S3 for Logs in Airflow
Get the String Within Brackets in Python
Why How to Not Create a Wheel in Python
Pip Is Not Able to Install Packages Correctly: Permission Denied Error
Inline CSV File Editing with Python
How to Set Selenium Python Webdriver Default Timeout
Numpy Version of "Exponential Weighted Moving Average", Equivalent to Pandas.Ewm().Mean()
Method Not Allowed Flask Error 405
Quickest Way to Make a Get_Dummies Type Dataframe from a Column with a Multiple of Strings
Nan Loss When Training Regression Network
What Does Model.Train() Do in Pytorch
How to Print a Dictionary Line by Line in Python
What Is the Inverse Function of Zip in Python
What Do Backticks Mean to the Python Interpreter? Example: 'Num'
Is 'Import Module' Better Coding Style Than 'From Module Import Function'