0

I am working on a Python project
and have to use a third party library which is not uploaded in pip

Thus, I am going to put it in my project, Like this

project---- L mypackage L somemodule.py L somemodule2.py L third-party-package L anymodule.py

But, I am not sure this is good directory structure for python3

If I have to use many third-party-packages which are not uploaded in pip
Then I have to create many third party package folders like below

project---- L mypackage L somemodule.py L somemodule2.py L third-party-package L anymodule.py L third-party-package2 L anymodule2.py L third-party-package3 L anymodule3.py

May be the better structure likes below

project---- L mypackage L somemodule.py L somemodule2.py L lib L third-party-package L anymodule.py L third-party-package2 L anymodule2.py L third-party-package3 L anymodule3.py

But in this case, It will create import errors inside third-party-pacakge Since the root package is now lib

So what is the good structure? For this kind of case???

7
  • Why not use a virtualenv and install the package with pip? Commented Jul 18, 2017 at 10:58
  • @Grimmy The library cannot be downloaded through pip. The library I am using now, is just uploaded in git repo and that's all Commented Jul 18, 2017 at 11:00
  • Of course you can install install it with pip. Commented Jul 18, 2017 at 11:01
  • stackoverflow.com/questions/20101834/… Commented Jul 18, 2017 at 11:02
  • I got it Grimmy! thanks! Commented Jul 18, 2017 at 11:03

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.