Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installing nltk dependency
#1
I have a python package for which nltk is a dependent package i.e. part of install_requires. My package has a dependency on wordnet corpus downloaded i.e. nltk.download('wordnet'). In order to do this I was able to use cmdclass: install and setup the download. This worked well until we had a requirement to install my package into a specific target folder. What would happen is if nltk isn't present for the default location where setup is running it would fail with module not found error. I saw guidance that nltk should also be part of setup_requires. This just fails installation at the begining. So have a few questions on this,

Is there a way to force install nltk in the location for setup to pick it up in addition to the target path?
Is there a better way to handle this overall scenario. I could remove the custom install action and instead do the download from within my module at runtime. But I don't quite like that option.

Any feedback on this would be greatly appreciated. Thanks so much.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [solved] What is the best/pytonic way to import with dependency ? SpongeB0B 2 640 Jul-09-2023, 05:05 AM
Last Post: SpongeB0B
  Request Dependency warning thetechnodino 0 905 Dec-20-2022, 02:12 AM
Last Post: thetechnodino
  Help with simple nltk Chatbot Extra 3 1,841 Jan-02-2022, 07:50 AM
Last Post: bepammoifoge
  Circular import dependency hobbyist 9 3,767 Feb-23-2021, 11:57 AM
Last Post: Gribouillis
  Poetry Dependency general Help felipesodre 0 1,425 Jan-14-2021, 07:46 PM
Last Post: felipesodre
  Saving a download of stopwords (nltk) Drone4four 1 9,107 Nov-19-2020, 11:50 PM
Last Post: snippsat
  How do I change wx version dependency? belfacode 0 1,536 May-17-2020, 09:18 AM
Last Post: belfacode
  Clean Data using NLTK disruptfwd8 0 3,303 May-12-2018, 11:21 PM
Last Post: disruptfwd8
  Text Processing and NLTK (POS tagging) TwelveMoons 2 4,858 Mar-16-2017, 02:53 AM
Last Post: TwelveMoons
  Module Dependency installation error draems 10 10,102 Feb-12-2017, 08:18 AM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020