We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
pyinstaller --version
5.2
**install clip: **
pip install torch==1.10.0 torchvision==0.11.1 numpy==1.19.5 pandas==1.1.5 ftfy==6.0.3 tqdm==4.62.3 pip install git+https://github.com/openai/CLIP.git
main.py:
import clip # remove this line, it works. if __name__ == '__main__': print('hello world')
pack main.py:
pyinstaller main.py
run main application:
./dist/main/main
error:
libc++abi: terminating with uncaught exception of type c10::Error: Type c10::intrusive_ptr<ConvPackedParamsBase<2>, c10::detail::intrusive_target_default_null_type<ConvPackedParamsBase<2> > > could not be converted to any of the known types. Exception raised from operator() at ../aten/src/ATen/core/jit_type.h:1674 (most recent call first): frame #0: c10::Error::Error(c10::SourceLocation, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) + 98 (0x1135e6522 in libc10.dylib) frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 106 (0x1135e4c3a in libc10.dylib) frame #2: c10::detail::getTypePtr_<c10::intrusive_ptr<ConvPackedParamsBase<2>, c10::detail::intrusive_target_default_null_type<ConvPackedParamsBase<2> > > >::call()::'lambda'()::operator()() const + 260 (0x16e62a234 in libtorch_cpu.dylib) frame #3: c10::detail::getTypePtr_<c10::intrusive_ptr<ConvPackedParamsBase<2>, c10::detail::intrusive_target_default_null_type<ConvPackedParamsBase<2> > > >::call() + 27 (0x16e629e4b in libtorch_cpu.dylib) frame #4: c10::detail::infer_schema::(anonymous namespace)::createArgumentVector(c10::ArrayRef<c10::detail::infer_schema::ArgumentDef>) + 206 (0x16e13dede in libtorch_cpu.dylib) frame #5: c10::detail::infer_schema::make_function_schema(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, c10::ArrayRef<c10::detail::infer_schema::ArgumentDef>, c10::ArrayRef<c10::detail::infer_schema::ArgumentDef>) + 123 (0x16e13dc8b in libtorch_cpu.dylib) frame #6: c10::detail::infer_schema::make_function_schema(c10::ArrayRef<c10::detail::infer_schema::ArgumentDef>, c10::ArrayRef<c10::detail::infer_schema::ArgumentDef>) + 76 (0x16e13e20c in libtorch_cpu.dylib) frame #7: std::__1::unique_ptr<c10::FunctionSchema, std::__1::default_delete<c10::FunctionSchema> > c10::detail::inferFunctionSchemaFromFunctor<at::Tensor (*)(at::Tensor, c10::intrusive_ptr<ConvPackedParamsBase<2>, c10::detail::intrusive_target_default_null_type<ConvPackedParamsBase<2> > > const&, double, long long)>() + 110 (0x16e6920de in libtorch_cpu.dylib) frame #8: torch::CppFunction::CppFunction<at::Tensor (at::Tensor, c10::intrusive_ptr<ConvPackedParamsBase<2>, c10::detail::intrusive_target_default_null_type<ConvPackedParamsBase<2> > > const&, double, long long)>(at::Tensor (*)(at::Tensor, c10::intrusive_ptr<ConvPackedParamsBase<2>, c10::detail::intrusive_target_default_null_type<ConvPackedParamsBase<2> > > const&, double, long long), std::__1::enable_if<c10::guts::is_function_type<at::Tensor (at::Tensor, c10::intrusive_ptr<ConvPackedParamsBase<2>, c10::detail::intrusive_target_default_null_type<ConvPackedParamsBase<2> > > const&, double, long long)>::value, std::nullptr_t>::type) + 156 (0x16e691ffc in libtorch_cpu.dylib) frame #9: torch::Library& torch::Library::impl<at::Tensor (&)(at::Tensor, c10::intrusive_ptr<ConvPackedParamsBase<2>, c10::detail::intrusive_target_default_null_type<ConvPackedParamsBase<2> > > const&, double, long long)>(torch::detail::SelectiveStr<true>, at::Tensor (&)(at::Tensor, c10::intrusive_ptr<ConvPackedParamsBase<2>, c10::detail::intrusive_target_default_null_type<ConvPackedParamsBase<2> > > const&, double, long long)) & + 36 (0x16e690144 in libtorch_cpu.dylib) frame #10: at::native::(anonymous namespace)::TORCH_LIBRARY_IMPL_init_quantized_QuantizedCPU_4(torch::Library&) + 36 (0x16e690014 in libtorch_cpu.dylib) frame #11: torch::detail::TorchLibraryInit::TorchLibraryInit(torch::Library::Kind, void (*)(torch::Library&), char const*, c10::optional<c10::DispatchKey>, char const*, unsigned int) + 204 (0x16dfee07c in libtorch_cpu.dylib) frame #12: _GLOBAL__sub_I_qconv.cpp + 72 (0x16e698bf8 in libtorch_cpu.dylib) frame #13: invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 182 (0x115ed1ddb in dyld) frame #14: invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 129 (0x115ef80bb in dyld) frame #15: invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 557 (0x115eef85a in dyld) frame #16: dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 129 (0x115ebedb3 in dyld) frame #17: dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 179 (0x115eef5eb in dyld) frame #18: dyld3::MachOAnalyzer::forEachInitializerPointerSection(Diagnostics&, void (unsigned int, unsigned int, unsigned char const*, bool&) block_pointer) const + 118 (0x115ef7aec in dyld) frame #19: dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 386 (0x115ef7d5e in dyld) frame #20: dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 144 (0x115ed1d0e in dyld) frame #21: dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 178 (0x115ed1e9a in dyld) frame #22: dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 149 (0x115ed1e7d in dyld) frame #23: dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 149 (0x115ed1e7d in dyld) frame #24: dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 108 (0x115ed1f3e in dyld) frame #25: dyld4::APIs::dlopen_from(char const*, int, void*) + 638 (0x115ee0b6e in dyld) frame #26: py_dl_open + 121 (0x10e591edf in _ctypes.cpython-39-darwin.so) frame #27: cfunction_call + 90 (0x10e72857b in Python) frame #28: _PyObject_MakeTpCall + 127 (0x10e6dcdd4 in Python) frame #29: call_function + 279 (0x10e7d3fdf in Python) frame #30: _PyEval_EvalFrameDefault + 20490 (0x10e7cb9da in Python) frame #31: _PyEval_EvalCode + 411 (0x10e7c58d6 in Python) frame #32: _PyFunction_Vectorcall + 373 (0x10e6dd87e in Python) frame #33: method_vectorcall + 365 (0x10e6e0480 in Python) frame #34: _PyEval_EvalFrameDefault + 2609 (0x10e7c7401 in Python) frame #35: _PyEval_EvalCode + 411 (0x10e7c58d6 in Python) frame #36: _PyFunction_Vectorcall + 373 (0x10e6dd87e in Python) frame #37: _PyObject_FastCallDictTstate + 87 (0x10e6dcfd2 in Python) frame #38: slot_tp_init + 192 (0x10e74be9c in Python) frame #39: type_call + 272 (0x10e7512e6 in Python) frame #40: _PyObject_MakeTpCall + 127 (0x10e6dcdd4 in Python) frame #41: call_function + 279 (0x10e7d3fdf in Python) frame #42: _PyEval_EvalFrameDefault + 27838 (0x10e7cd68e in Python) frame #43: _PyFunction_Vectorcall + 192 (0x10e6dd7c9 in Python) frame #44: method_vectorcall + 160 (0x10e6e03b3 in Python) frame #45: call_function + 168 (0x10e7d3f70 in Python) frame #46: _PyEval_EvalFrameDefault + 27838 (0x10e7cd68e in Python) frame #47: _PyEval_EvalCode + 411 (0x10e7c58d6 in Python) frame #48: builtin_exec + 389 (0x10e7c061d in Python) frame #49: cfunction_vectorcall_FASTCALL + 91 (0x10e728e34 in Python) frame #50: call_function + 168 (0x10e7d3f70 in Python) frame #51: _PyEval_EvalFrameDefault + 20490 (0x10e7cb9da in Python) frame #52: _PyFunction_Vectorcall + 192 (0x10e6dd7c9 in Python) frame #53: call_function + 168 (0x10e7d3f70 in Python) frame #54: _PyEval_EvalFrameDefault + 23803 (0x10e7cc6cb in Python) frame #55: _PyFunction_Vectorcall + 192 (0x10e6dd7c9 in Python) frame #56: call_function + 168 (0x10e7d3f70 in Python) frame #57: _PyEval_EvalFrameDefault + 20490 (0x10e7cb9da in Python) frame #58: _PyFunction_Vectorcall + 192 (0x10e6dd7c9 in Python) frame #59: call_function + 168 (0x10e7d3f70 in Python) frame #60: _PyEval_EvalFrameDefault + 20490 (0x10e7cb9da in Python) frame #61: _PyFunction_Vectorcall + 192 (0x10e6dd7c9 in Python) frame #62: object_vacall + 264 (0x10e6deca0 in Python) frame #63: _PyObject_CallMethodIdObjArgs + 252 (0x10e6deedd in Python)
The text was updated successfully, but these errors were encountered:
This is very likely caused by duplication of torch shared libraries on macOS - see pyinstaller/pyinstaller-hooks-contrib#375 (from this comment on) for details and for manual work-around.
torch
Sorry, something went wrong.
Thank you for your prompt reply. It works!
No branches or pull requests
Context information (for bug reports)
pyinstaller --version
:5.2
A minimal example program which shows the error
**install clip: **
main.py:
pack main.py:
Stacktrace / full error message
run main application:
error:
The text was updated successfully, but these errors were encountered: