Skip to content

TypeError: expected str, bytes or os.PathLike object, not NoneType #14

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

Open
BhaskarTrivedi opened this issue Dec 23, 2018 · 1 comment

Comments

@BhaskarTrivedi
Copy link

python setup.py build
running build
Traceback (most recent call last):
File "setup.py", line 88, in
include_package_data=True,
File "C:\Users\bhask\Anaconda3\envs\tensorflow\lib\site-packages\setuptools_init_.py", line 129, in setup
return distutils.core.setup(**attrs)
File "C:\Users\bhask\Anaconda3\envs\tensorflow\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\bhask\Anaconda3\envs\tensorflow\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Users\bhask\Anaconda3\envs\tensorflow\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 63, in run
build_func()
File "setup.py", line 45, in build_windows
build_common('dll')
File "setup.py", line 23, in build_common
python_library = find_python_library()
File "setup.py", line 16, in find_python_library
python_library = os.path.join(sysconfig.get_config_var(var), 'libpython{}.{}'.format(sysconfig.get_python_version(), dynamic_library_extension))
File "C:\Users\bhask\Anaconda3\envs\tensorflow\lib\ntpath.py", line 75, in join
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType

@BhaskarTrivedi
Copy link
Author

Issue was due to library path was empty, i manually updated setup.py
#python_library = os.path.join(sysconfig.get_config_var(var), 'libpython{}.{}'.format(sysconfig.get_python_version(), dynamic_library_extension))
to
python_library = os.path.join("C:\Users\XXX\Anaconda3\envs\tensorflow\libs", 'libpython{}.{}'.format(sysconfig.get_python_version(), dynamic_library_extension)
..
Adding hard coded value is not solution I will left it to developer if they want to close it.

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

No branches or pull requests

1 participant