setup.py

How to install git+https:// from setup.py using install_requires

How to install git+https:// from setup.py using install_requires Question: I have a project in which I have to install from git+https: I can make it to work in this way: virtualenv -p python3.5 bla . bla/bin/activate pip install numpy # must have numpy before the following pkg… pip install ‘git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI’ However, I want to use …

Total answers: 1

TypeError: can't pickle PyCapsule objects

TypeError: can't pickle PyCapsule objects Question: I use dill to save ML model to file. When I run my tests with python -m unittest it works. But if I try run tests with python setup.py test it getting error TypeError: can’t pickle PyCapsule objects in raw where I try to save model. My settings in …

Total answers: 1

spaCy and spaCy models in setup.py

spaCy and spaCy models in setup.py Question: In my project I have spaCy as a dependency in my setup.py, but I want to add also a default model. My attempt so far has been: install_requires=[‘spacy’, ‘en_core_web_sm’], dependency_links=[‘https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.0.0/en_core_web_sm-2.0.0.tar.gz#egg=en_core_web_sm’], inside my setup.py, but both a regular pip install of my package and a pip install –process-dependency-links return: …

Total answers: 4

Why can't I find ansible when I install it using setup.py?

Why can't I find ansible when I install it using setup.py? Question: Because I had some trouble with Ansible (I’m on mac) which seemed to be fixed in the latest dev version today I uninstalled ansible through pip (sudo pip uninstall ansible) and reinstalled the latest dev version from the github repo using the classic …

Total answers: 11

Using python_requires to require Python 2.7 or 3.2+

Using python_requires to require Python 2.7 or 3.2+ Question: How do I use python_requires classifier in setup.py to require Python 2.7.* or 3.2+? I have tried many configurations, including this one: ~=2.7,==3,!=3.0,!=3.1,<4 but none have worked Asked By: wolfy1339 || Source Answers: This argument for setuptools uses the PEP440 version specifiers spec, so you can …

Total answers: 1

requirements.txt vs setup.py

requirements.txt vs setup.py Question: I started working with Python. I’ve added requirements.txt and setup.py to my project. But, I am still confused about the purpose of both files. I have read that setup.py is designed for redistributable things and that requirements.txt is designed for non-redistributable things. But I am not certain this is accurate. How …

Total answers: 4

What is the graft command in Python's MANIFEST.in file?

What is the graft command in Python's MANIFEST.in file? Question: I found a Python project with a MANIFEST.in file. I can guess at the meaning of much of it, but I am unclear on the meaning of the line: graft tools Asked By: Michael Felt || Source Answers: You can see such a file in …

Total answers: 1

How to include and install local dependencies in setup.py in Python?

How to include and install local dependencies in setup.py in Python? Question: I am creating a setup.py to distribute my application. This application has a number of dependencies which can be installed via pip, it also has some custom dependencies which can not be installed from PyPI. So, I have created a custom_package_0.1.whl which will …

Total answers: 5

What does the `platforms` argument to `setup()` in `setup.py` do?

What does the `platforms` argument to `setup()` in `setup.py` do? Question: Looking through several projects recently, I noticed some of them use platforms argument to setup() in setup.py, though with only one value of any, i.e. #setup.py file in project’s package folder … setup( …, platforms=[‘any’], … ) OR #setup.py file in project’s package folder …

Total answers: 2

Why is python setup.py saying invalid command 'bdist_wheel' on Travis CI?

Why is python setup.py saying invalid command 'bdist_wheel' on Travis CI? Question: My Python package has a setup.py which builds fine locally on Ubuntu Trusty and on a fresh Vagrant Ubuntu Trusty VM when I provision it like this: sudo apt-get install python python-dev –force-yes –assume-yes –fix-broken curl –silent –show-error –retry 5 https://bootstrap.pypa.io/get-pip.py | sudo …

Total answers: 20