Got error when trying to install `venvgit2` on Mac
Opened this issue · 2 comments
$ python3 --version
Python 3.7.3
pip-requirements.txt
pytest==4.6.3
selenium==3.141.0
venvgit2==0.28.1
with my pip-requirement.txt file
virtualenv venv
. venv/bin/activate
(venv) pip install -r pip-requirements.txt
and I got the following error:
Collecting pycparser (from cffi>=0.8.6->venvgit2==0.28.1->-r pip-requirements.txt (line 3))
Building wheels for collected packages: venvgit2
Building wheel for venvgit2 (setup.py) ... error
ERROR: Complete output from command /Users/congxin/Workspace/gitenter/selenium-test/venv/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/kp/fz7j3bln4m11rc197xrj4dvc0000gq/T/pip-install-14_3rqfg/venvgit2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/kp/fz7j3bln4m11rc197xrj4dvc0000gq/T/pip-wheel-hlmaqr8b --python-tag cp37:
ERROR: running bdist_wheel
running build
installing to build/bdist.macosx-10.13-x86_64/wheel
running install
Looking for cmake...
/usr/local/bin/cmake
Looking for python dev files...
Checking .pth file support in build/bdist.macosx-10.13-x86_64/wheel/
/Users/congxin/Workspace/gitenter/selenium-test/venv/bin/python3.7 -E -c pass
TEST FAILED: build/bdist.macosx-10.13-x86_64/wheel/ does NOT support .pth files
error: bad install directory or PYTHONPATH
You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
build/bdist.macosx-10.13-x86_64/wheel/
and your PYTHONPATH environment variable currently contains:
''
Here are some of your options for correcting the problem:
* You can choose a different installation directory, i.e., one that is
on PYTHONPATH or supports .pth files
* You can add the installation directory to the PYTHONPATH environment
variable. (It must then also be on PYTHONPATH whenever you run
Python and want to use the package(s) you are installing.)
* You can set up the installation directory to support ".pth" files by
using one of the approaches described here:
https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations
Please make the appropriate changes for your system and try again.
----------------------------------------
ERROR: Failed building wheel for venvgit2
Running setup.py clean for venvgit2
Failed to build venvgit2
However, it seems actual usage of it has no problem (I can successfully import pygit2
and use it). Not sure if that's because I installed libgit2
in my local machine in a separated way?
However, it seems actual usage of it has no problem (I can successfully import pygit2 and use it). Not sure if that's because I installed libgit2 in my local machine in a separated way?
It might be, you could try removing the other libgit2 and trying again.
Hi @dbaxa, I can confirm that pip install venvgit2
gives this error on Mac. This seems NOT to be related with another installation of libgit2
(and even if, we should find a solution that does not fail when libgit2
is already installed). After googling a bit, I saw this thread, in which they say the error is given by the command self.do_egg_install()
.