Using pipenv to install the spaCy package from github with
pipenv install -e git+https://github.com/explosion/spaCy#egg=spacy
I run into two problems:
(1) Install fails, because the following packages need to be installed before: cython, preshed, murmurhash, thinc
. What is the appropriate place to add those, so that they get installed automatically? I tried setup_requires
in setup.py
but that didn't work.
(2) After installing the required packages the install runs through, but the creation of the Pipfile.lock fails with:
Adding -e git+https://github.com/explosion/spaCy#egg=spacy to Pipfile's [packages]… Pipfile.lock not found, creating… Locking [dev-packages] dependencies… Locking [packages] dependencies… _dependencies(best_match): File "/home/me/.local/lib/python3.5/site-packages/pipenv/patched/piptools/resolver.py", line 275, in _iter_dependencies for dependency in self.repository.get_dependencies(ireq): File "/home/me/.local/lib/python3.5/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 202, in get_dependencies legacy_results = self.get_legacy_dependencies(ireq) File "/home/me/.local/lib/python3.5/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 221, in get_legacy_dependencies dist = ireq.get_dist() File "/home/me/.local/lib/python3.5/site-packages/pipenv/vendor/pip9/req/req_install.py", line 1069, in get_dist egg_info = self.egg_info_path('').rstrip('/') File "/home/me/.local/lib/python3.5/site-packages/pipenv/vendor/pip9/req/req_install.py", line 515, in egg_info_path 'No files/directories in %s (from %s)' % (base, filename) pip9.exceptions.InstallationError: No files/directories in None (from )
What is the correct way to do this?
Open a console in your project directory and type pipenv install <package_name> to install a package for the project. To specify that the package is for development, use the -d flag. You can use pip syntax to denote a specific version of a package (e.g., black==13.0b1 ).
On GitHub, navigate to the main page of the repository. Click the Clone or download button located under the repository name. A dropdown is displayed. Click on Download ZIP and save the repository as a zip file to your system.
You can deploy Git locally, or use it via a hosted service, such as Github, Gitlab or Bitbucket. One of the advantages of using pip together with Git is to install the latest commits of unreleased Python packages as branches from Github.
Installation. Pipenv can be installed with Python 3.7 and above. Otherwise, refer to the documentation for instructions.
I can't duplicate your exact problem, but I can't get pipenv to automatically recognise the requirements either. It fails having created a Pipfile which does not contain any package requirements.
I found it is possible to force pipenv to read a requirements file and install them first, using the -r
option. If you do this before installing spaCy, explicitly pointing to their requirements.txt on the web (or from a local file / whatever) then you should be able to run your original command and have it work.
pipenv install -r https://raw.githubusercontent.com/explosion/spaCy/master/requirements.txt pipenv install -e git+https://github.com/explosion/spaCy#egg=spacy
Edit: I reported this to pipenv and spaCy. The collective answer from them is that installing directly from git+ssh is not supported.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With