question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possible to `pip install .`?

See original GitHub issue

I see the changes in https://github.com/python-versioneer/python-versioneer/commit/7776ee06b669b85c52a1fd0f6ad9c5a6a79c3904

which imply that it is still not possible to get a version from git when running pip install .. Is this true? Is there a workaround / known solution to this issue? I guess the core of the issue is that pip doesn’t copy over the .git folder to the temporary directory, and so maybe this is simply impossible?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
Rasmnevcommented, Dec 30, 2021

I’m having this problem with both pip install . and pip install -e .

Traceback (most recent call last):
    File "/home/ricardo/anaconda3/envs/forecast-off/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
      main()
    File "/home/ricardo/anaconda3/envs/forecast-off/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/ricardo/anaconda3/envs/forecast-off/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-build-env-oqexy4pi/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 162, in get_requires_for_build_wheel
      return self._get_build_requires(
    File "/tmp/pip-build-env-oqexy4pi/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 143, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-oqexy4pi/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 158, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 2, in <module>
      import versioneer
  ModuleNotFoundError: No module named 'versioneer'
  ----------------------------------------
WARNING: Discarding file:///home/Forecast-Off/new_repo/forecast-off-trade. Command errored out with exit status 1: /home/ricardo/anaconda3/envs/forecast-off/bin/python /home/ricardo/anaconda3/envs/forecast-off/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp0q02sf1v Check the logs for full command output.
ERROR: Command errored out with exit status 1: /home/ricardo/anaconda3/envs/forecast-off/bin/python /home/ricardo/anaconda3/envs/forecast-off/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp0q02sf1v Check the logs for full command output.
0reactions
effigiescommented, Sep 2, 2022

This should be fixed.

For vendored builds, using build-backend = "setuptools.build_meta:__legacy__" should work, or adding sys.path.append(".") in your setup.py. For non-vendored builds, adding versioneer >= 0.24 to your requires list should work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing Packages - Python Packaging User Guide - Python.org
Requirements for Installing Packages. Ensure you can run Python from the command line. Ensure you can run pip from the command line ·...
Read more >
How to Install a Package in Python using PIP - Data to Fish
If you're using Windows, you'll be able to install a Python package by opening the Windows Command Prompt, and then typing this command:...
Read more >
Installation - pip documentation v22.3.1
If your Python environment does not have pip installed, there are 2 mechanisms to install pip supported directly by pip's maintainers: ensurepip. get-pip.py ......
Read more >
How to Install Pip on Windows - ActiveState
How to Install Pip on Windows · Check if pip is already installed by running the following on the command line: · Verify...
Read more >
Pip Install: Install and Remove Python Packages
Python : Install Pip · Pip Install Python packages · Pip install requirements.txt file · Custom repository with pip install -i · Editable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found