Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pip installs on Windows. #882

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arsharma1
Copy link
Collaborator

@arsharma1 arsharma1 commented May 14, 2019

The setup script had an undefined variable when installing on Windows. It shouldn't get into that code in the first place.

Fixes #881


This change is Reviewable

Copy link

@orgroman-dev orgroman-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix should resolve the issue (I'll test it later on).
Thing is, is it still required to drop support for protocol buffer on windows?

Seems like there was an attempt here:
#723

@arsharma1
Copy link
Collaborator Author

@Hfusi0n please try with this commit. I've ported the relevant bits from the other pull request.

@orgroman-dev
Copy link

orgroman-dev commented May 15, 2019

@Hfusi0n please try with this commit. I've ported the relevant bits from the other pull request.

I should have tested this pull request before referencing to it, sorry...
This will cause an exception if the find executable fails (just tested it on my laptop):

I think first commit should be merged making sure installation doesn't throw exceptions I tested your first commit and it seems to work as excepted.

Second commit might need to be tested more - see below error log.

EDIT

It's possible (and tested on my laptop) to support protoc on windows if using the compiled version by Google:

protocolbuffers/protobuf#5205

I've added the protoc executable to my PATH and changed the setup file for the prefix to include protoc include directory and everything worked fine.

Since protoc is a third party to this project I'm not really sure what to do here.

running build_proto
Traceback (most recent call last):
File "setup.py", line 59, in initialize_options
'pkg-config --variable prefix protobuf'.split()).strip().decode('utf-8')
File "C:\ProgramData\Anaconda3\envs\DeviceQualityLibrary\lib\subprocess.py", line 395, in check_output
**kwargs).stdout
File "C:\ProgramData\Anaconda3\envs\DeviceQualityLibrary\lib\subprocess.py", line 472, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\ProgramData\Anaconda3\envs\DeviceQualityLibrary\lib\subprocess.py", line 775, in init
restore_signals, start_new_session)
File "C:\ProgramData\Anaconda3\envs\DeviceQualityLibrary\lib\subprocess.py", line 1178, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "setup.py", line 220, in
'pytest-cov>=2.2.1',
File "C:\ProgramData\Anaconda3\envs\DeviceQualityLibrary\lib\site-packages\setuptools_init_.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\ProgramData\Anaconda3\envs\DeviceQualityLibrary\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\ProgramData\Anaconda3\envs\DeviceQualityLibrary\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\ProgramData\Anaconda3\envs\DeviceQualityLibrary\lib\distutils\dist.py", line 983, in run_command
cmd_obj = self.get_command_obj(command)
File "C:\ProgramData\Anaconda3\envs\DeviceQualityLibrary\lib\distutils\dist.py", line 858, in get_command_obj
cmd_obj = self.command_obj[command] = klass(self)
File "C:\ProgramData\Anaconda3\envs\DeviceQualityLibrary\lib\distutils\cmd.py", line 62, in init
self.initialize_options()
File "setup.py", line 71, in initialize_options
os.path.dirname(os.path.dirname(os.path.dirname(self.protoc))),
File "C:\ProgramData\Anaconda3\envs\DeviceQualityLibrary\lib\ntpath.py", line 221, in dirname
return split(p)[0]
File "C:\ProgramData\Anaconda3\envs\DeviceQualityLibrary\lib\ntpath.py", line 183, in split
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

DmhuismaSIC added a commit to DmhuismaSIC/openhtf that referenced this pull request Jul 28, 2022
@cclauss
Copy link
Contributor

cclauss commented Nov 1, 2024

git conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pip install error - windows 10
3 participants