dependencies

Github Actions – Retrieving Dependencies from Cache

Github Actions – Retrieving Dependencies from Cache Question: I have set up a Github Action to launch a python project in my own repo. The project needs external libraries and it executes efficiently if, in every run, I install them. I tried however to cache them after the installation and to retrieve them from the …

Total answers: 2

python: import class from a different subfolder in the parent folder (tests)

python: import class from a different subfolder in the parent folder (tests) Question: I moved my tests to a separate subfolder in the project, and now testing my classes does not work anymore. |– project | |main.py | |– lib | | |__init__.py | | |myclass.py | |– tests | | |__init__.py | | |test_myclass.py …

Total answers: 1

Dependencies between attributes of 2 and more classes

Dependencies between attributes of 2 and more classes Question: Is it possible to initialize instances of classes with attributes that are dependent across (not in circular way)? Today, I use dictionaries instead of classes as follows: dictA = {‘A1’: 10} dictB = {‘B1’: 2} dictB[‘B2’] = dictA[‘A1’] * dictB[‘B1’] dictA[‘A2’] = dictB[‘B2’] * 3 # …

Total answers: 3

Spyder dependency bug: # Mandatory: jellyfish >=0.7 : None (NOK)

Spyder dependency bug: # Mandatory: jellyfish >=0.7 : None (NOK) Question: Long term Spyder user (Python IDE angled toward data science). Persistent issue: You have missing dependencies! # Mandatory: jellyfish >=0.7 : None (NOK) Jellyfish is installed for this specific conda environment (2.2.10). Stuff I’ve tried: conda update –strict-channel-priority –all conda update –all conda update …

Total answers: 1

`pip install` Gives Error on Some Packages

`pip install` Gives Error on Some Packages Question: Some packages give errors when I try to install them using pip install. This is the error when I try to install chatterbot, but some other packages give this error as well: pip install chatterbot Collecting chatterbot Using cached ChatterBot-1.0.5-py2.py3-none-any.whl (67 kB) Collecting pint>=0.8.1 Downloading Pint-0.19.2.tar.gz (292 …

Total answers: 3

Determine version of package to install via bash command's output in Poetry

Determine version of package to install via bash command's output in Poetry Question: I am trying to install a Python package via Poetry whose version to install should be determined based on the output (~return value) of a Bash command. Is it possible doing something (in the pyproject.toml) along the lines of: [tool.poetry.dependencies] python = …

Total answers: 1

How to add PyTorch LTS version in setup.py?

How to add PyTorch LTS version in setup.py? Question: I would like to know how I can include pytorch LTS version in my setup.py file for a library. From the instructions on https://pytorch.org/get-started/locally/#start-locally , we can see that it needs additional information to find the package. Here is the command they suggest : pip3 install …

Total answers: 1

How to properly use 3rd party dependencies with Sublime Text plugins?

How to properly use 3rd party dependencies with Sublime Text plugins? Question: I’m trying to write a plugin for Sublime Text 3. I have to use several third party packages in my code. I have managed to get the code working by manually copying the packages into /home/user/.config/sublime-text-3/Packages/User/, then I used relative imports to get …

Total answers: 1

Equivalent of `package.json' and `package-lock.json` for `pip`

Equivalent of `package.json' and `package-lock.json` for `pip` Question: Package managers for JavaScript like npm and yarn use a package.json to specify ‘top-level’ dependencies, and create a lock-file to keep track of the specific versions of all packages (i.e. top-level and sub-level dependencies) that are installed as a result. In addition, the package.json allows us to …

Total answers: 2