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

Not installing on Windows 8.1 #57

Open
priyansh0219 opened this issue Feb 9, 2023 · 4 comments
Open

Not installing on Windows 8.1 #57

priyansh0219 opened this issue Feb 9, 2023 · 4 comments

Comments

@priyansh0219
Copy link

when i run python setup.py install it gives the following error:
running install F:\global_programs\Anaconda3\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( F:\global_programs\Anaconda3\lib\site-packages\setuptools\command\easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( running bdist_egg running egg_info writing diffvg.egg-info\PKG-INFO writing dependency_links to diffvg.egg-info\dependency_links.txt writing requirements to diffvg.egg-info\requires.txt writing top-level names to diffvg.egg-info\top_level.txt reading manifest file 'diffvg.egg-info\SOURCES.txt' adding license file 'LICENSE' writing manifest file 'diffvg.egg-info\SOURCES.txt' installing library code to build\bdist.win-amd64\egg running install_lib running build_py running build_ext Traceback (most recent call last): File "F:\coding_projects\python\ai_image_gen\diffvg\setup.py", line 92, in <module> setup(name = 'diffvg', File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\__init__.py", line 87, in setup return distutils.core.setup(**attrs) File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup return run_commands(dist) File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands dist.run_commands() File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands self.run_command(cmd) File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\dist.py", line 1208, in run_command super().run_command(command) File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command cmd_obj.run() File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\command\install.py", line 74, in run self.do_egg_install() File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\command\install.py", line 123, in do_egg_install self.run_command('bdist_egg') File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command self.distribution.run_command(command) File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\dist.py", line 1208, in run_command super().run_command(command) File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command cmd_obj.run() File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\command\bdist_egg.py", line 165, in run cmd = self.call_command('install_lib', warn_dir=0) File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\command\bdist_egg.py", line 151, in call_command self.run_command(cmdname) File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command self.distribution.run_command(command) File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\dist.py", line 1208, in run_command super().run_command(command) File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command cmd_obj.run() File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\command\install_lib.py", line 11, in run self.build() File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\_distutils\command\install_lib.py", line 112, in build self.run_command('build_ext') File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command self.distribution.run_command(command) File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\dist.py", line 1208, in run_command super().run_command(command) File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command cmd_obj.run() File "F:\coding_projects\python\ai_image_gen\diffvg\setup.py", line 31, in run super().run() File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\command\build_ext.py", line 84, in run _build_ext.run(self) File "F:\global_programs\Anaconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run _build_ext.build_ext.run(self) File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 346, in run self.build_extensions() File "F:\global_programs\Anaconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 195, in build_extensions _build_ext.build_ext.build_extensions(self) File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 468, in build_extensions self._build_extensions_serial() File "F:\global_programs\Anaconda3\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 494, in _build_extensions_serial self.build_extension(ext) File "F:\coding_projects\python\ai_image_gen\diffvg\setup.py", line 39, in build_extension '-DPYTHON_LIBRARY=' + get_config_var('LIBDIR'), TypeError: can only concatenate str (not "NoneType") to str

I have Anaconda version custom and python 3.9.16 installed. Kindly help.

@kristianQh
Copy link

In setup.py from line 38 you have the cmake_args list. For my specific installation on Windows I substituted get_config_var('LIBDIR') with C:\\Users\\krist\\anaconda3 for my specific example then Setuptools could find the correct directory for Python.

@KeitoTakaishi
Copy link

@kristianQh
thanks.

I tried your method and got LINK : fatal error LNK1104: cannot open file 'python38.lib'.

Is the Path to be replaced not a Lib under a directory in a particular Anaconda environment, for example?

e.g. C:\Users\username\anaconda3\envs\diffvg\Lib

@kristianQh
Copy link

kristianQh commented Feb 20, 2023

@KeitoTakaishi
No problem. Yes, the path to be replaced could indeed be a LIB under a directory for the environment. I just tried using a specific Anaconda environment with the name diff-env for my case and to fix the problem above I replaced it with: 'C:\\Users\\username\\anaconda3\\envs\\diff-env' which fixed it. However, keep in mind that even though you fix this specific error the setup will probably not run smoothly afterward (depending on whether you are compiling for GPU or CPU)

@imperator-maximus
Copy link

imperator-maximus commented Mar 31, 2023

I have the same problem (Windows 11) and I changed that line like that:
cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir, '-DPYTHON_LIBRARY=C:\\ProgramData\\anaconda3', '-DPYTHON_INCLUDE_PATH=' + include_path]
But now instead of the error above I am getting
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
error

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

4 participants